WO1997024696A2 - Computer-assisted animation construction system and method and user interface - Google Patents

Computer-assisted animation construction system and method and user interface Download PDF

Info

Publication number
WO1997024696A2
WO1997024696A2 PCT/CA1996/000881 CA9600881W WO9724696A2 WO 1997024696 A2 WO1997024696 A2 WO 1997024696A2 CA 9600881 W CA9600881 W CA 9600881W WO 9724696 A2 WO9724696 A2 WO 9724696A2
Authority
WO
WIPO (PCT)
Prior art keywords
pose
getareal
false
sub
animation
Prior art date
Application number
PCT/CA1996/000881
Other languages
French (fr)
Other versions
WO1997024696A3 (en
Inventor
Roman B. Kroitor
Original Assignee
Imax Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Imax Corporation filed Critical Imax Corporation
Priority to JP52393897A priority Critical patent/JP4048447B2/en
Priority to EP96942218A priority patent/EP0875042B1/en
Priority to DE69606890T priority patent/DE69606890T2/en
Priority to AU32353/97A priority patent/AU3235397A/en
Priority to CA002241854A priority patent/CA2241854C/en
Publication of WO1997024696A2 publication Critical patent/WO1997024696A2/en
Publication of WO1997024696A3 publication Critical patent/WO1997024696A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/44Morphing

Definitions

  • This invention relates to a system and method for creating two and three-dimensional computer-assisted animation, and a simple and intuitive user interface for generating a series of animation images from a relatively few source drawings.
  • computers are often used to assist an animator in creating an animation sequence by generating intermediate animation frames which are placed in between frames drawn by the animator.
  • the frames drawn by the animator are referred to as key frames or poses.
  • the computer generated intermediate frames are referred to as "in-between” frames and are used to transform an image from one key pose to another.
  • the process of generating these in-between poses is often referred to as "tweening" or "in-betweening.”
  • Generation of the in-between poses is based on computer interpolation between the animator's key frames.
  • the animator specifies the number of in-between frames based on the complexity of the motion, and the computer generates the in-between frames to create a smooth transformation in the resulting animation sequence.
  • the advantage of this technique is that it eliminates the laborious task of manually generating the individual in-between frames.
  • Computer in-betweening for three-dimensional animation is discussed in U.S. Patent No. 4,600,919 to Stern.
  • Prior art computer tweening methods are lacking in several respects.
  • some prior art tweening systems use simple linear interpolation to generate intermediate poses between key frames.
  • One problem with this approach is that it results in actions in objects that appear "robotic.” The problem can be minimized by increasing the number of key poses, but this requires more manually generated drawings and defeats the purpose of computer-assisted tweening.
  • Another problem is that linear interpolation can cause distortion of objects experiencing rotational motion by shortening segments of the objects at certain angles of rotation.
  • a third problem is that discontinuities in the speed of motion often result if i) the number of in-betweens in adjacent intervals is constant, but the distance between key poses is not, or ii) the distance between adjacent key positions is equal but the number of in-between poses in the interval are not.
  • the animator traces out a motion path along which an object is to move.
  • the animator can specify a selection function to designate which picture of an object is used for any given frame along the P-curve.
  • the object can be a bouncing ball and the animator can specify that as the ball bounces, a drawing showing a compressed ball can be used.
  • a source pose is an animator-created drawing of an object used in the present invention to create computer- generated poses of the object for animation.
  • a source pose may, but is not required to be, part of the animation.
  • the invention has application to both two and three- dimensional computer animation.
  • any number of source poses can in theory be specified by the animator, but practically 1-7 source poses would be used. These source poses do not necessarily correspond identically to the appearance of the animated object in any of the resulting animated poses.
  • the source poses are used to construct composite poses used in animation sequences, referred to herein as "constructed poses.” In each constructed pose, the object's appearance is constructed from a weighted average of the source poses.
  • a three-dimensional drawing space is provided using a computer- driven stereoscopic viewing system incorporating a computer input device such as a three-axis (6 degree of freedom) position sensor or drawing "wand" which utilizes sensors to track the movement and orientation of the wand in three-dimensional space.
  • the position of the wand is represented by a cursor which is displayed within the three-dimensional drawing space.
  • a predetermined portion of the three-dimensional drawing space referred to herein as the "pose transformation space,” is displayed in the viewing system.
  • the pose transformation space is a tetrahedron. In this case, four source poses are represented by the tetrahedron, one at each vertex.
  • Each point within the tetrahedron represents a constructed pose defined by a unique combination of the four source poses.
  • the drawing wand is moved to control the movement of the wand cursor within the tetrahedron in order to define the transformation of the animated object.
  • the position of the wand cursor relative to each vertex of the tetrahedron controls the constructed pose at that point in time.
  • the constructed poses are composed of weighted averages of the source poses.
  • the constructed poses are viewed in real ⁇ time as the wand cursor moves within the pose transformation space enclosed by the tetrahedron, thus providing instantaneous feedback to the animator of the action being created or "scripted.”
  • an animated object can be made to perform any action which, given the nature of the four source poses, can be specified by a progression of three-dimensional graph points determined by the path of the wand in the pose transformation space, referred to herein as a "transformation graph.”
  • the velocity of the pose transformation may be controlled by the rate of motion of the wand cursor in the pose transformation space.
  • the velocity may be independently controlled by displaying a graphical representation of the relative rate of transformation as a function of position along the transformation graph ⁇ referred to herein as a "velocity profile graph" or velocity profile for the transformation — to specify the instantaneous rate of transformation.
  • This velocity profile permits an animator to modify the rate of transformation along the transformation graph using the input device.
  • the actions of different characters and objects and parts thereof may be defined using different transformation graphs, thus providing independent control over the action of the characters in a resulting animation sequence. If less than four source poses are to be used by the animator, a two-dimensional transformation space may be used (e.g, a triangle for three source poses).
  • a second aspect of the present invention is directed to further modifying constructed poses to provide for greater control over the form and action of computer-generated animated images undergoing some form of motion or transformation, which may be specified as a distortion or "warp" of one or more line segments of a drawing.
  • a point within the drawing is chosen as a reference point, referred to herein as a "warp handle,” which will typically be on a line segment of a source pose, but need not be so located.
  • a motion path relative to this reference point referred to herein as a "warp path” — is then drawn in the drawing space.
  • the warp path defines a motion path in time relative to the reference warp handle, thus generating a set of relative x, y, and z displacements as a function of time.
  • the line segment or segments to be modified by the warp path are then specified by any one of a number of methods, such as pointing and clicking with the drawing wand.
  • a graph is drawn which defines the degree to which the successive points on the line segment or segments are displaced by the warp path. This graph is referred to herein as a "warp profile graph.”
  • the set of relative displacements is then applied to the designated segments, as modulated by the warp profile graph.
  • This general technique referred to herein as “segment warping,” may be modified to create various effects, such as the effect on an object of wind, of inertia, and to create the movement of a wave along the specified segments.
  • a third aspect of the present invention creates a number of related segment warps simultaneously. This is accomplished by defining, on each source pose, a single, straight line “spine” extending approximately through the centerline of a group of line segments to be warped. Any of the above- described warps may be applied to the spine and the resulting warp of the spine is appropriately transferred to each point on each of the affected line segments in the group. This provides the animator with a tool for very simply specifying complicated transformations to groups of line segments simultaneously.
  • a final aspect of the present invention relates to the automatic painting of closed loops (which may represent a surface of an object in a stereoscopic viewing system) drawn in two or three- dimensional space by "flood-filling" the loop (each of the two-dimensional left and right eye projections of the loop in a stereoscopic system).
  • Flood- filling is a technique known in the art of computer graphics.
  • the system and method of the present invention uses a different technique for painting closed loops, referred to herein ad "fill masking.”
  • the animator need only define the color with which the loop is to be filled in a single source pose and the color is maintained in each constructed pose regardless of the distortions the loop undergoes during motion.
  • a two-dimensional geometric shape which is typically a rectangle, is generated automatically to encompass the loop by making it slightly larger than the loop based on the minimum and maximum x and y coordinates of the loop.
  • the entire rectangle is generated in the fill color of the loop chosen by the animator.
  • the loop outline is transferred to the rectangle in its chosen line color or colors.
  • a "fill" of the area bounded by the rectangle and the line forming the exterior of the loop is then performed, using the traditional flood-fill technique.
  • This filled area is defined to be transparent so that when the resulting rectangle is displayed, the viewable image consists only of the loop in the appropriate filled color. This process is automatically repeated for each of the filled loops which comprise the complete character or object animation.
  • Figs. l(a)-(d) illustrate four source poses of a fish for use in an animation sequence.
  • Figs. 2(a)-(d) illustrate the four source poses of the fish's mouth of Fig. 1.
  • Fig. 3 is a three-dimensional tetrahedral pose transformation space used to generate the transformation graphs of the present invention.
  • Fig. 4 is a transformation graph of the present invention for the mouth of a fish drawn in the pose transformation space of Fig. 3.
  • Fig. 5 is a transformation graph of the present invention for the eye brows of a fish drawn in a three-dimensional tetrahedral pose transformation space.
  • Fig. 6 is a transformation graph of the present invention for the body and fins of an animated fish, using only two vertices for a three- dimensional tetrahedral pose transformation space.
  • Fig. 7 is a transformation graph of the present invention for the eyes of an animated fish, using only two vertices for a three- dimensional tetrahedral pose transformation space.
  • Figs. 8(a)-(f) illustrates the animation frames resulting from the combination of the transformation graphs of Figs. 4, 5, 6 and 7.
  • Figs. 9(a)-(d) illustrate the velocity profiles for the transformation graphs of Figs. 4, 5, 6, and 7.
  • Figs. 10(a)-(d) illustrate the velocity profiles for the transformation graphs of Figs. 4, 5, 6, and 7 adjusted by the use of sync points.
  • Figs. ll(a)-(f) illustrate the advantage of using match points in constructed poses.
  • Figs. 12(a)-(b) illustrate the segment warp technique of the present invention.
  • Figs. 13 illustrates a warp profile graph used for the segment warps shown in Fig. 12(a).
  • Fig. 14 illustrates the resulting motion created by the segment warp defined by Figs. 12-13.
  • Fig. 15 illustrates an angel wing as an example of the problems with prior art in-betweening systems.
  • Figs. 16(a)-(c) illustrate how the problem of Fig. 15 is corrected using the segment warp technique of the present invention.
  • Fig. 17(a)-(f) illustrate the wind effect that can be achieved using a variation of the segment warp of the present invention.
  • Figs. 18(a)-(e) illustrate the wave effect that can be achieved using a further variation of the segment warp of the present invention.
  • Figs. 19(a)-(b) illustrate the spine warp of the present invention.
  • Figs. 20(a)-(c) illustrate the problems with prior art seed point and flood-fill techniques for filling loops with color.
  • Figs. 21(a)-(c) illustrate the fill masking technique of the present invention for overcoming the drawbacks of prior art seed point and flood-fill techniques.
  • the invention utilizes computer systems for drawing and viewing stereoscopic (three-dimensional) images and applies such systems to the field of computer-assisted animation.
  • Systems for drawing in three- dimensional space are known in the art of computer graphics.
  • One example of such a system is described in Schmandt, C, "Interactive Three- dimensional Computer Space," SPIE Vol. 367, pp. 155-59 (1982).
  • the system described therein utilizes an ordinary CRT display monitor which is viewed by the user through a half-silvered mirror placed at a 45° angle with the monitor.
  • the user is provided with a three-dimensional drawing space beneath the mirror and a "wand" for drawing in the three dimensional space.
  • the wand used in the described system utilizes magnetic position sensing technology to provide its x, y, and z position as well as its attitude.
  • the three dimensional (stereoscopic) effect is achieved by the user viewing the CRT through special glasses utilizing lead lanthanum zirconate titanate (PLZT) ceramic wafers which function as electrically operated shutters.
  • PTZT lead lanthanum zirconate titanate
  • the left and right eye views are effectively time-multiplexed by displaying them on alternate raster scans.
  • the operation of the glasses is synchronized with the video signal to allow one eye at a time to view the proper image on the CRT providing the three- dimensional effect.
  • This technique is sometimes referred to as field sequential three-dimensional imaging.
  • An alternate means for providing a three-dimensional view is through the use of anaglyph (two color) left and right eye image separation.
  • a limitation of this implementation is that the drawn images are monochrome, whereas the field sequential technique allows for color images.
  • a third means for providing left and right eye image separation is through the use of polarizing filters where the left eye image is polarized one way and the right eye image polarized another. The polarized images are normally viewed by projecting them onto a screen and viewing them through appropriately polarized glasses.
  • the present invention requires a three-dimensional stereoscopic viewing system using one of the above techniques to permit the animator to draw directly in three-dimensional space.
  • the three-dimensional drawing and viewing system utilizes a computer workstation monitor and field sequential left and right image separation using synchronized liquid crystal shutter glasses.
  • the animator uses an electro-mechanical device referred to as a drawing "wand” to draw the three-dimensional drawings.
  • the wand is actually a three-dimensional location tracker, which is available from several suppliers, including Ascension Technologies, Inc.
  • a drawing wand referred to as the "Flock of Birds" by Ascension is used.
  • the device uses electromagnetic waves to provide its position and orientation in three-dimensional space.
  • Liquid crystal shutter glasses are available from, among others, Stereographies Corp.
  • a high resolution 17-inch monitor by Nanao has been found to the best from the standpoint of image resolution and stability as well as ease of use.
  • a cursor moves within the drawing space under control of the wand and when a button on the wand is pushed, a continuous line in three- dimensional space following the path of the cursor is drawn.
  • the line is composed of a series of closely-spaced points joined by very short line vectors to form what appears to be a single, continuous smooth line. It is important that the system provide for vector-based as opposed to bit ⁇ mapped drawings, so that the line segments drawn by the animator may be mathematically defined and processed by the computer.
  • the present invention relates more specifically to several novel ways for transforming only a few drawings to create animation sequences.
  • the invention incorporates several techniques for creating computer-assisted animation that are simple for an animator to use and provide the animator with control over the form and motion of animated objects that is lacking in existing computer animation systems.
  • animation consists of the transformation of images in time to create the appearance of motion.
  • the invention discloses several techniques for generating transformations in a manner that is simple and intuitive to use for an animator, and which also provides the animator with a great degree of control over the way in which images are transformed in order to provide realistic, life-like motion.
  • the first aspect of the invention relates to a concept referred to as transformation graphs which permit the animator to simply and intuitively generate different, computer-constructed poses of animated objects based on source poses drawn by the animator.
  • a three- dimensional transformation graph may be implemented as follows (although two-dimensional graphs may also be used).
  • the animator is provided with an image through the three-dimensional viewing system of a polyhedron, such as a tetrahedron.
  • the tetrahedron is shown in the three-dimensional drawing space using well-known techniques for generating and displaying left and right eye two-dimensional images to create a three-dimensional effect.
  • the tetrahedron displayed is only a guide for the animator and does not become part of the drawings used in the animation.
  • Each of the four vertices of the tetrahedron is defined to represent a source pose hand-drawn by the animator.
  • Each source pose consists of a vector-drawn representation of an animated object or portion of an object.
  • source poses may be generated by prior-art computer animation systems and utilized in the present invention.
  • four poses of a figure can be drawn, each with different positions of the legs.
  • the four poses may then be represented at each of the four vertices of the tetrahedron.
  • These four poses themselves are not sufficient to realistically represent motion.
  • a sufficient number of poses to create realistic motion are constructed from these four poses.
  • These constructed poses are based on composites of the four source poses.
  • the constructed poses are defined by the animator by moving the wand in the three-dimensional space within the tetrahedron, referred to as the pose transformation space.
  • the motion of the wand is tracked in time as it is moved within the tetrahedron and a three-dimensional graph of the wand ' s position traced out within the pose transformation space is generated.
  • Each point on the graph represents a pose constructed from the four source poses.
  • the number of points depends on the sampling rate of the drawing wand.
  • the generation of constructed poses in this manner provides for continuous transformations of images in a manner simple for the animator to use.
  • the animator "scripts" the action of a character or object simply by moving the wand cursor within the transformation space.
  • the graphs so created are referred to as transformation graphs because they define a continuously transforming series of poses constructed from the source poses. Different actions of the figure can be generated by different paths of the wand cursor in the transformation space.
  • the figure referred to above can be made to "mark time,” walk forward, walk backward, walk with big steps, little steps, etc., and these actions can be continuously created in any sequence simply by manipulating the wand.
  • the transformation graphs are generated as follows. Using the example of a tetrahedral drawing space, at each point along the transformation graph, the constructed pose associated with the point is defined by the location of the point in space relative to the four vertices of the tetrahedron. The closer the point is to a vertex, the more the source pose assigned to the vertex will affect the appearance of the constructed form.
  • a simple linear weighting scheme is used so that the weight of each vertex or source pose is inversely proportional to the distance from the graph point to the vertex. For example, if a graph point is, in three-dimensional space, a distance x away from the first vertex (vl), 2x from the second (v2), 3x from the third (v3), and 4x from the fourth (v4), each of the four source poses associated with the four vertices will be weighted accordingly. In other words, the points defining the line segments of the constructed pose will be placed in accordance with a weighted average of the positions of the points in each of the four source poses.
  • the source poses need not actually be part of the resulting motion sequence, which may utilize only composites of the source poses.
  • the transformation graph need not anywhere touch a vertex.
  • the transformation graph can move through any path in the pose transformation space in any sequence desired by the animator.
  • the tetrahedron is modified so that each edge is not a straight line but the arc of a circle centered at an opposite vertex and with a radius equal to the length of one side of the tetrahedron.
  • Each vertex represents, by definition, a source pose, so that the weight of any of the other three vertices is defined to be zero at that vertex. In other words, the contribution of a source pose goes to zero when the distance of the vertex to which that pose is assigned to the point on the transformation graph is equal to the length of an edge of the tetrahedron.
  • the resulting constructed pose will be composed primarily from the two vertices at each end of the edge. However, the remaining two vertices will have non-zero effects because the distance to these vertices will diminish as the edge is traversed. Thus, it would not be possible to script a motion sequence constructed from only the two source poses represented by the two vertices at each end of the edge.
  • any such potential problem is solved by utilizing the circular arcs in order to maintain a constant distance from each of the two non-contributing vertices as a path between the two vertices at the ends of the arc is traversed. It will be apparent to those of ordinary skill in the art that the shape of the transformation space need not be exact as it is only intended to be a guide for the animator in scripting action sequences.
  • Figs. l(a)-(d) illustrate four possible configurations for the facial expressions of an animated fish.
  • the fish is drawn without illustrating the z-component and therefore appears two-dimensional, but is meant to depict a fish in a three- dimensional stereoscopic drawing.
  • Fig. 1 there are four different source poses for the fish's mouth as shown in Fig. 2 - frown (Fig.
  • FIG. 2(a) For example, at a point m midway along the line cd, the constructed pose defined by this point (a medium-sized mouth) will be formed primarily from the source poses at vertices c (small mouth) and d (large mouth).
  • Fig. 4 illustrates a transformation graph drawn by the animator (using the wand) which controls the transformation of the shape of the mouth.
  • point S which is essentially a frown
  • the transformation graph progresses toward vertex c to point 1, then toward vertex b to point 2, then upward along the line bd to point 3, then downward on the plane abd to point 4, then along the line ab to the end point E.
  • the transformation graph is shown essentially along the surfaces of the tetrahedron for purposes of illustrating it in a two-dimensional drawing, the graph may be drawn through any part of the volume enclosed by the tetrahedron.
  • the computer calculates, based on the sampled position of the wand in space, the location of the cursor from each vertex and then draws the resulting constructed pose.
  • a subset of the points (every nth point) making up the constructed pose is selected for display so that the series of constructed poses can be seen in real time and the animator can view the motion he is scripting. This is done essentially in real time so that the animator can view the motion he is scripting as he moves the wand to control the cursor movement.
  • Fig. 5 illustrates a three-dimensional transformation graph for another element of the fish drawing, the eye brows, Fig. 6 for the fish's body and fins taken together, and Fig. 7 for the eyes.
  • Fig. 5 illustrates a three-dimensional transformation graph for another element of the fish drawing, the eye brows, Fig. 6 for the fish's body and fins taken together, and Fig. 7 for the eyes.
  • Fig. 5 illustrates a three-dimensional transformation graph for another element
  • Fig. 7 illustrates the transformation graph for the eyes along the line m-n, although tetrahedron mnop is shown.
  • a triangle on a plane may be used as the pose transformation space.
  • a sequence using only two poses can be scripted on a pose transformation space consisting simply of a line with one pose assigned to each end of the line.
  • the pose transformation space may be readily extended by utilizing the existing capability of the drawing wand to sense orientation.
  • Each of the three components — pitch, roll, and yaw — may represent an additional source pose thus providing three additional source poses. This allows for a six dimensional pose transformation space in which any possible combination of seven source poses can be defined. Other inputs, such as foot-pedals, could provide for additional source poses.
  • the cursor in the pose transformation space would only reflect four poses; the degree of effect of the other inputs could only be seen in the resulting constructed pose.
  • the transformation graphs are also used to control the rate of transformation, which correlates to the apparent speed of the action produced in the animated object in the resulting animation sequence. Because the drawing system is sampling the position of the wand at a fixed rate, the position of the wand as a function of time is known. Therefore, the rate of movement of the wand is known and may be used to control the rate or speed of the scripted transformation.
  • each point may correspond to a frame of animation.
  • the animator may first define the number of frames desired for the sequence and then draw the graph in "slow motion.” In this case, the number of frames in the animation sequence will be less than the number of graph points generated.
  • the transformation graph may be drawn faster than real time so that the number of frames will be greater than the number of graph points.
  • the transformation graphs are interpolated accordingly, to create the number of frames selected by the animator.
  • the stored frames may then be played back at the rate at which they will be seen by the viewer (which is typically 24 or 30 frames per second) so that the animator can determine if the speed of the motion is appropriate. They can also be played back at faster and slower frame rates for analysis.
  • the animator is provided with a graphical representation of the rate of transformation of the poses throughout the sequence of poses, referred to herein as a "velocity profile" for the transformation graph.
  • the velocity profile shows the relative rate of change of the poses along the transformation graph.
  • the animator can adjust the velocities along the transformation graph using, e.g., a point, click, and drag action known in the art to modify the velocity profile, or by redrawing the velocity profile entirely.
  • the spacing of the transformation points along the transformation graph is adjusted by interpolation in such a manner that the animation sequence still occurs over the correct number of frames. For example, if the relative speed of the action is increased in a portion of the transformation graph, it will be appropriately decreased in the remaining portion of the transformation graph.
  • Figs. 8(a)-(f) illustrate the frames of animation resulting from the combined transformation graphs in Figs. 4, 5, 6 and 7.
  • Fig. 8(a) point S on the transformation graphs
  • the fish is approaching a piece of food which he notices in Fig. 8(b) (point 1).
  • the sequence then continues until the fish swallows the food.
  • Figs. 8(c) through 8(f) correspond to points 2, 3, 4, and E in Figs. 4, 5, 6 and 7.
  • the points relate to different frames of animation, i.e., different points in time during a transformation sequence.
  • times 0, 1, 2, 3, 4, and E may correspond to frames 1, 40, 90, 150, 180 and 240, respectively.
  • Fig. 9(a)-(d) show the velocity profiles of the transformation graphs for the mouth, eyebrows, body, and eyes, respectively, which are illustrated in Figs. 4-7, as they might be after recording the respective transformation graphs.
  • the x-axis indicates time or number of frames and the y-axis the instantaneous rate of transformation of the constructed poses.
  • a zero rate of transformation means that the image is static; a flat, non-zero rate that the image is transforming at a constant rate, a positive slope means that the rate is increasing and a negative slope that the rate is decreasing.
  • six points are shown, i-vi, each corresponding to a frame in an animation sequence.
  • the legend adjacent to each of the graphs indicates the pose associated with the frame.
  • the velocity profiles of Figs. 9(a)-(d) may be displayed after an animator has generated the respective transformation graphs to indicate the rate of transformation as drawn by the animator. Note that as shown, the points i-vi do not correspond to the same frame in each of the four velocity profiles.
  • the animator may manually modify the profile by "nudging" (using the wand cursor to push parts of the graph into a different shape) a portion of the graph or by redrawing the entire graph to adjust the transformation rate as desired.
  • the animator may simultaneously view the played-back action of the mouth, which was scripted using a transformation graph and stored. In this manner, the animator may manually synchronize the actions of the elements. Repeated "takes” may be used until the animator is satisfied with the synchronization. The playback may be in real time or, if desired, in slow motion to facilitate synchronization. Alternatively, this may be done using the concept of synchronization points or "sync" points. Sync points are used to specify that at a particular point in time during a sequence (i.e., a particular frame of animation within a sequence of frames), a group of elements will have a selected form, such as the open mouth of the fish.
  • a frame identifier is first assigned to the designated frame (point in time) where the sync point will occur.
  • the constructed pose to be assigned to the selected frame is chosen by using a pointing device (such as the drawing wand) to scroll along a linear scroll bar representative of the entirety of the transformation graph.
  • a pointing device such as the drawing wand
  • the constructed pose corresponding to that point on the transformation graph is displayed.
  • the position of the cursor on the actual transformation path is displayed as well.
  • a wand button is clicked to indicate that that pose is to be synchronized with the selected frame.
  • the corresponding constructed pose (i.e., squashed eyes) is chosen by the animator in the same manner.
  • This pose is assigned the same frame identifier as the frame in the transformation graph for the mouth so that it too is synchronized with the selected frame.
  • the selected mouth pose and the corresponding eye pose will occur in the same frame and therefore the same point in time.
  • the sequence of poses along the transformation path is not affected.
  • the velocity of the transformation must be adjusted. This is done by reducing or expanding the number of frames between each sync point, as required. This is done by interpolation, so that in so far as possible the original velocity profile is maintained.
  • the resulting animation sequence may be played back to determine if there is a discontinuity noticeable to a viewer.
  • sudden changes in the velocity of a transformation are not detectable by the viewer.
  • the shape of the velocity profile may be adjusted or re-drawn by the animator to eliminate the discontinuity. It is likely that there will be multiple sync points used along a transformation graph. The same procedure is followed for each such point.
  • Figs. 10(a)-(d) illustrate the sync point concept.
  • the sync points are labelled SP1-SP4. These might, for example, correspond to frames 40, 90, 150, and 180 as shown in Figs. 8(a)-(f).
  • Fig. 10(a) is the velocity profile for the transformation graph for the mouth of the fish and Figs. 10(b)-(d) the eyebrows, body, and eyes, respectively.
  • the velocity profiles in Figs. 10(a)-(d) correspond to the transformation graphs of Figs. 4-7, respectively, but in this case have been re-generated using sync points.
  • the large (wide open) mouth must occur when the eyes of the fish are squashed towards the top of its head and the small mouth when the eyes are wide open. Therefore, point SP1 along the transformation graph is assigned to the point in time when the mouth is small and point SP3 when the mouth is large.
  • the velocities along the transformation graph are then adjusted (by interpolation) so that point ii in Fig. 9(a) (small mouth) has been shifted later by 20 frames, and point iv (large mouth) has been shifted later by 70 frames, to occur at frames 40 and 150, respectively.
  • point SP2 (frame 90) is assigned to the point in time when the first smile occurs and SP4 (frame 180) when the second smile occurs (points iii and v in Fig. 9(a), respectively). All the other elements are similarly adjusted, so that proper synchronization occurs, as shown in Figs. 10(a)-(d), and the desired relationships of the different features as shown in Figs 8(a)-(f) are obtained. Sync points may also be used to properly synchronize the action within a constructed pose transformation sequence to a sound track.
  • Segments of the source poses may be mapped onto one another using match points to avoid undesirable constructed poses.
  • match points break up lines into segments so that the weighted averaging discussed above to calculate point locations occurs along corresponding segments in each pose.
  • Figs. ll(a)-(c) represent a profile view of a character's head with a growing nose. Of course, the intention is that the head maintain the same shape as the nose grows.
  • match points A and B are assigned as shown in Figs.
  • Table 1 is one embodiment of the pseudo-code for calculating a constructed pose from the four source poses of a tetrahedron.
  • Table 2 is one embodiment of the pseudo-code for creating an animated sequence from the source poses and a transformation graph.
  • DistToVertex Sqrt UP1.X - P2.X) ⁇ 2 + (Pl.Y - P2 Y) " + (PI Z - P2 Z) ⁇ 2), End,
  • DistA DistToVertex (CalcPos, VertexA) , ⁇ Assumes vertices defined elsewhere)
  • DistB DistToVertex (CalcPos, VertexB) ;
  • DistC • DistToVertex (CalcPos, VertexC) ;
  • DistD • DistToVertex (CalcPos, VertexD) ;
  • ProportionA ProportionA / PropScalmg
  • ProportionB ProportionB / PropScalmg
  • ProportionC ProportionC / PropScalmg
  • ProportionD ProportionD / PropScalmg
  • DestPose.Poin [I] .X : ProportionA * PoseA.Point[I] .X +
  • ProportionB * PoseB.Point[I] .X + ProportionC * PoseC.Point[I] .X + ProportionD * PoseD.Point[I] .X; DestPose.Point[I] .Y : ProportionA * PoseA.Point[I] .Y +
  • ProportionB * PoseB.Point[I] .Y + ProportionC * PoseC.Point[I] .Y + ProportionD * PoseD.Point[I] .Y; DestPose.Poin [I] .Z . ProportionA * PoseA.Poin [I] .Z +
  • This routine computes the frames of composed animation from four source poses and a transformation graph.
  • PoseC, PoseD LineType ( The four source poses ) Var TransGraph LineType; ⁇ Trans. Graph is 3 ust a line)
  • the system and method of the present invention also provides for the tying together of different, separately transformed groups of line segments by specifying an attach point on one group of elements to which another group is connected.
  • This feature is useful in the case where different groups of elements experience different motions, but one group is in reality attached to the other, such as in the case of the head and body of a person.
  • This feature is implemented by specifying a first group of elements as the master and a second group as the slave. In the above example, the master would be the body and the head the slave. Techniques for relating the locations of animated groups in this manner are known to those of skill in the art in the field of computer animation.
  • a transformation graph through two or more pose transformation spaces may pass through a common vertex of the tetrahedra to generate a continuous motion sequence.
  • an action is scripted inside a first tetrahedron and then through a vertex which is common between a first tetrahedron and a second tetrahedron (which have a common source pose at that vertex).
  • the animator then continues the transformation graph in the second tetrahedron which has three different source poses associated with its other vertices.
  • the second tetrahedron may connect with a third tetrahedron and so forth.
  • the endpoint constructed pose of a motion sequence which need not be a source pose, may be used as one of the source poses in the transformation space for a second motion sequence.
  • the transformation graph for the second motion sequence is started at the vertex associated with that source pose, so that the action is continuous and seamless when the two sequences are joined together.
  • the transformation graphs may be stored and are not uniquely associated with specific source poses -- the same transformation graph representing, e.g., a walking action, may be applied to control the animation sequence for different sets of source poses representing different characters.
  • source poses can be stored for use with different transformation graphs.
  • the animation sequences generated by the transformation graphs may themselves be represented in a tetrahedral transformation space in order to generate a single output animation sequence.
  • four different perspective views (e.g., 90° apart) of a walking action may be created by generating four sets of constructed poses.
  • the four sets of constructed poses may be generated by drawing a transformation graph for one of the perspective views, using four source poses for that perspective view, and then using the same transformation graph for each of the other three pose transformation spaces associated with the other three perspective views. In this manner, synchronization of the four sets of constructed poses is automatic.
  • Each set of constructed poses is then assigned to one vertex of a tetrahedron, which in this case may be considered a perspective transformation space rather than a pose transformation space.
  • the source pose at each vertex varies as a function of time, i.e., it is determined by the constructed pose for that vertex at any given point in time.
  • a transformation graph is then drawn within this tetrahedron to specify the contribution each constructed pose makes at each point in time during the transformation, to the final single constructed pose at that point.
  • the final constructed pose is determined by a composite of the four source poses, except that each source pose actually represents a different perspective of the same pose.
  • a transformation graph can be generated representing a continuous walking action with a continuous change of the viewer's perspective on that action to simulate, for example, a camera panning around an object.
  • the aforedescribed transformation graph technique for scripting motions is a significant improvement over existing computer animation systems. Simply by manipulating a wand in a three- dimensional drawing space, an animator can create long and complex motions using a user interface that allows such motions to be generated in an intuitive manner as a "performance," somewhat as a puppeteer would control the actions of a puppet, and to view the motion in real time.
  • the advantage of this technique is most significant in three-dimensional computer-assisted animation, where creating even a single pose, much less an entire sequence, using existing techniques is complicated and time consuming. For two-dimensional animation, the technique may be used to produce long sequences of two-dimensional animation with little effort.
  • both the position in space and the transformation of an object are represented simultaneously in a pose.
  • the system and method of the present invention provides the flexibility to separate the transformation of an object from its path in space.
  • the wand may be used to generate a path in space (referred to as a "space path") for a character or object separately from defining a pose transformation graph.
  • the path in space has an associated velocity graph, which may be modified as described above by adjusting or redrawing it, or through the use of sync points.
  • a second aspect of the present invention is referred to as "segment warping" and is also directed to further modifying constructed poses to provide for greater control over the form and action of animated images.
  • Segment warps are described as follows.
  • a point within the drawing space referred to herein as a warp displacement reference point or "warp handle,” is chosen, which will typically be on a line segment of a source pose, but need not be so located.
  • the function of the warp handle is to serve as a reference point for a motion path relative to this point, referred to herein as a "warp path.”
  • the warp path is drawn by the animator in real time or in slow or fast motion.
  • the warp path defines, for each segment or segments to be modified by the segment warp, the relative displacement of the warp handle from its starting point.
  • the line segment or segments of a drawing to be modified by the warp path are then specified by any one of a number of methods, such as pointing and clicking with the drawing wand.
  • a graph referred to herein as a "warp profile graph,” is drawn which defines the degree to which the successive points on the line segment or segments are displaced by the warp path.
  • the segment warp technique is best described with reference to a specific example. In the fish shown in Fig. 12(a), match points are placed on the fish body and tail at points labelled MP1, MP2, MP3, and MP4.
  • a warp handle, H is then placed on the segment between MP2 and MP3.
  • the three segments, MP1-MP2, MP2-MP3, and MP3-MP4, are then identified as the segments to be warped.
  • Fig. 12(b) illustrates the warp path, shown as the dotted line with arrows indicating direction.
  • the warp path represents the back and forth motion of a fish's tail and is represented by a series of arcs.
  • the warp path is not part of the drawing itself and is not shown in the final animation.
  • the path is shown moving toward the first extreme EX1, then toward an opposite extreme, EX2, then back toward the first extreme EX1 again.
  • a warp profile graph is then drawn for the three segments as shown in Fig. 13.
  • the warp profile graph defines the relative effect of the warp path of Fig. 12(b) on each successive point along the selected line segments.
  • the effect of the warp on segment MP1-MP2 is zero at MP1 and increases to 90% at MP2, stays constant at 90% for segment MP2-MP3, and varies from 90% at MP3 to 0% at MP4 for segment MP3-MP4. This means that, for example, at any point in time, the displacement of the points along segment MP2-MP3 will be 90% of the relative displacement of the warp handle from its initial position at that point in time.
  • segment warps simply represent point displacements for the points along selected line segments, they are additive -- multiple segment warps may be applied to the same segment or segments.
  • the effect of the segment warp on the three segments is shown in Fig. 14.
  • the tail is at its maximum displacement along the arc defined by the warp path.
  • segment MP2- MP3 is displaced to its maximum extent out of the paper (toward the observer).
  • segment MP2-MP3 is displaced to its maximum extent into the paper (away from the viewer.
  • the animator may specify the relative displacement of the points along the line segment in any of a number of ways, such as by varying the thickness, brightness, or color of the selected segment. It will be recognized by those of skill in the art that the segment warp technique provides a powerful and intuitive tool for animators to create complex motions very simply.
  • the animator can, in effect, "grab on” to the tail with a drawing wand and move it back and forth in real time, exactly as it is intended that the final motion should appear.
  • the rate and coordination of the motion with other motions of the object may be controlled using the previously described velocity profiles and sync points.
  • FIG. 15 illustrates the potential deficiencies of using simple interpolation to create new poses.
  • the motion of an "angel wing" is illustrated in Fig. 15 showing the movement of an angel's beating wings. Point E is at the tip of the right wing and point B at the tip of the left wing.
  • the wings are at the top of their arc (at pose 1) and at B ⁇ and E ⁇ , the bottom of their arc (at pose 2).
  • the midpoints of rotation of the wings are at B 2 and E 2 respectively.
  • the wing tips are at minimum x displacement at the top and bottom of the arc and at maximum x displacement at the midpoint.
  • the animator specifies only the top and bottom wing positions as shown in Fig. 15 as source poses, and the computer generates the constructed poses through linear interpolation, the result is that the wing will appear to shrink as it moves from top to bottom, as shown by the positions of the tips at B 2 and E 2 (dotted lines).
  • additional source poses may be specified by the animator at intermediate positions between the extremes of motion of the wing, but the additional poses may be needed for creating other wing motions, for example, a twisting of the wings as they beat up and down.
  • the segment warp technique of the present invention solves this problem as described with reference to Fig. 16.
  • match points are specified at points A, B, and C.
  • a warp handle, WH is then specified at point B, the wing tip.
  • a warp path, WP shown as the dotted line, is drawn to specify the relative displacement of the warp handle.
  • the warp path shown is for one downward sweep of the wing from the top of its arc to the bottom.
  • the warp profile is drawn as in Fig. 16(b).
  • the segment warp specified by the warp path and profile graph is then applied in conjunction with the pose transformations of the angel wings, which are specified with a pose transformation graph, as described above.
  • the displacements specified by the warp path are applied to the points along the segments A-B and A-C in accordance with the warp profile shown in Fig. 16(b).
  • this may be done by drawing the warp path while viewing the transformation of the angel's wings or using sync points to control the velocity profiles so that, for example, the maximum displacement of the warp from the reference point occurs when the wing is at the midpoint of the sweep downward of the wing.
  • a single warp path (basically an outward and inward motion) is drawn, continuously, for each down beat and each up beat, and the warps are synchronized to the beats as described above.
  • a similar segment warp would be applied to the left wing as well.
  • Fig. 17(a) illustrates a flag which the animator wants to illustrate as blowing in the wind.
  • Three segments of the flag are to be transformed by the segment warp, labelled SI, S2, and S3 as shown.
  • Match points MPl and MP2 are also shown at the lower corners of the flag.
  • SI is comprised of points 0- MPl, S2 of points MP1-MP2, and S3 of points MP2-3.
  • a wa ⁇ handle H is placed at point MP2 for convenience and potential warp path P, represented by the dotted line in Fig. 17(a), is drawn.
  • segment SI varies from zero displacement at the attach point 0 to maximum displacement at MPl.
  • Segment S2 is always at maximum displacement, and segment S3, like segment SI, varies from zero displacement at point 3 to maximum displacement.
  • the warp path P represents only the potential warp path of the segments.
  • the actual position along the path is determined by specifying a wind vector as shown in Fig. 17(c). This is simply drawn by the animator as if the wand were being blown back and forth by the wind, and recorded by the computer.
  • the wind is shown blowing along the x-axis only.
  • Fig. 17(d) represents the velocity profile for the wind which could be derived from tracking the rate of the back and forth motion of the drawing wand when generating the wind path shown in Fig. 17(c).
  • the maximum positive displacement along the potential warp path is applied and at maximum negative velocity, the maximum negative displacement is applied.
  • zero displacement is defined to occur at zero velocity. Displacements between zero and the maximum point and zero and the minimum point are produced simply by using the wind velocity at each frame interpolated so that the maximum wind velocity corresponds to maximum displacement. Depending on the direction (positive or negative) and speed of the wind, the segments will be warped as shown in Fig. 17(e) (negative) or 17(f) (positive). The displacement of a particular point of a line segment along the motion path at any given point in time is dictated by the velocity of the wind at that point in time, which could be positive or negative and thus also defines the direction of displacement.
  • the potential warp path must be drawn with reference to the wind direction. Thus, if the wind direction were not along only the x axis as shown in Fig. 17(a), but also along the z axis, a potential warp path would have to be drawn for how segments of the flag would be warped in the z axis. The wind velocity along the z axis would also be determined from the wind vector.
  • the advantage of this technique over a normal segment warp is that it provides for control of the displacement along a potential warp path as opposed to an actual predetermined warp path.
  • use of the wind warp permits the same wind vector to be applied to numerous elements in a drawing which will all be similarly affected by the wind.
  • the animator may specify that the wind warp be applied to different objects in a drawing at different times to create the effect of a gust of wind moving through a scene.
  • Inertial effects are created in a manner similar to wind effects.
  • the acceleration of a main object of motion is used. For example, if a character begins to run, his acceleration will cause his coat to lift up behind him in the opposite direction. A potential warp path for the coat may be drawn, and the position of the appropriate segments of the coat along the potential warp path determined by the change in velocity (acceleration) of the person wearing the coat. Thus, when the character begins to move from a standing position, acceleration is greatest and the coat will fan out behind him to the maximum extent. As the character reaches a steady velocity, however, his acceleration goes to zero and the coat returns to the zero displacement position.
  • Wave effects may also be created using the segment warp concept.
  • a "wave warp” is a means for creating the effect of a wave travelling through a segment or segments. In the case of a wave effect, a warp handle and warp path are not required.
  • a straight reference line A-B as shown in Fig. 18(a) is drawn.
  • the desired wave motion, shown as dotted line wl-w2 is drawn with reference to this line.
  • the wave W1-W2 need not lie in one plane but may be three-dimensional so as to define, for example, a corkscrew.
  • the displacements between each point along the wave relative to the line A-B is calculated based on vectors drawn normal to the straight line and intersecting the wave. For each point Pi along the wave, the corresponding displacement Di is calculated. As shown in Fig. 18(b), these relative displacements are then applied to a line segment S of a drawing in order to transfer the effect of the wave to the object or objects in the drawing (only P1-P7, representing the first crest of the wave, are illustrated).
  • Fig. 18(c) The result of the effect of the initial wave crest on the segment S in the first resulting frame is illustrated in Fig. 18(c).
  • the points along the segment D1-D7 are displaced an amount D1-D7, respectively.
  • the series of displacements D1-D7 defined by the wave of Fig. 18(a) is then shifted along the segment S (depending on the direction of travel of the wave) so that in the next frame of animation, the displacements are applied to different points along the segment S.
  • the wave is traveling to the right.
  • the displacements D1-D7 are shifted two points to the right so that they now are applied to points P3-P9 on the segment S.
  • the segment in frame 2 appears as shown in Fig.
  • a warp profile graph is used to modulate the effect of the wave path at each point along the segments affected segment or segments.
  • the warp profile graph may be drawn so that the wave effect may not be evident at all at the beginning of a segment but have an increasing effect as it travels along the segment.
  • the tail of a tadpole moving through the water would have no lateral wave movement at its root, but increasing movement toward the tail.
  • the animator specifies four parameters to control the wave effect: i) the velocity of wave travel in terms of the number of points shifted per frame; ii) the direction of wave travel; iii) the starting point of the wave; and iv) the ending point of the wave.
  • the wave path drawn by the animator is then interpolated based on these parameters to obtain the desired effect. For example, if the animator desires that the wave effect start and end on the segment so that it is present for the entire length of the animation, and that the velocity of wave travel is 1 point per frame, the length of the originally drawn wave path is adjusted by interpolation to be twice the length of the segment so that at the beginning of the animation, the entire first half of the wave is applied to the segment.
  • the wave path must be stretched by interpolation to four times the length.
  • the wave effect may also be specified as starting or ending off of the segment, in which case the length would similarly be adjusted.
  • Wave warps are a very simple but powerful method for creating motion which appears organic and life-like.
  • a constructed warp path and constructed wa profile graph are derived from the source warp paths and source warp profile graphs using weighted averaging in the same manner as for the constructed poses.
  • a constructed velocity profile is derived for the constructed warp path and may be modified as previously explained (the separate warp paths may need to be synchronized as described above so that they stay in sync regardless of the constructed pose).
  • the orientation of the constructed warp path is correctly related to the orientation of the object.
  • the constructed warp path then produces the segment warp, as described above for simple segment wa ⁇ s. For complex drawings using warps, it could be tedious if related warps were required for many segments.
  • Spine warping is used to transform objects comprising multiple line segments with a single warp by applying the wa ⁇ to a "spine" of the object.
  • the term spine is used because a straight line is drawn roughly through the centerline of a group of line segments which may, for example, define the body of an animal. A wa ⁇ is then applied to the spine and then transferred to the individual drawing segments.
  • a straight line reference spine is drawn in each source pose used in a transformation and the animator selects the segments to be affected by the spine warp.
  • pe ⁇ endicular distances from the points along the segment to the reference spine are calculated in order to transfer a warp applied to the spine to the selected segments.
  • Constructed poses are generated in the manner previously described.
  • the constructed poses include the straight line reference spine which is treated as an additional line in a source drawing but not displayed.
  • the spine warp is then applied to the appropriate segments of the constructed poses, using the displacements between the reference spine and the warped spine and the perpendicular distances from the points along the segments to the reference spine.
  • Fig. 19(a) illustrates a constructed pose of a fish with a straight line spine, S.
  • the spine is drawn by the animator but is not a part of the drawing that is displayed in the resulting animation frames.
  • the perpendicular distances from points Pl-Pn along the line segments to the spine are calculated and stored in order to transfer warps imposed on the spine to the segments of the drawing.
  • a single warp path P is used in combination with a warp profile graph to warp the spine S.
  • the spine may be warped by any of the above-described warps.
  • Fig. 19(b) illustrates the warped spine S' (intended to be shown bending into the paper). For each line segment controlled by the spine warp, each point along ' the segment is displaced using the calculated displacement of the wa ⁇ ed spine relative to the reference spine. In this manner, complex forms may be readily transformed in a simple manner using any of the above warping techniques.
  • a final aspect of the present invention also relates to creating constructed poses that maintain the proper coloring of source poses to enable the completely automatic painting of a series of animation drawings.
  • closed loops are drawn in two-dimensional space and filled in with color using a "seed" point.
  • the seed point acts as a starting point for the filling of closed loops in the color chosen by the animator. Painting proceeds outward from the point until the boundary of the loop is detected and filling the bounded area.
  • the seed fill technique has drawbacks when used for the automatic painting of stereo and two-dimensional images.
  • the seed fill method when used for small loops, it may be difficult or impossible for the animator to place the seed point within a stereo loop in such a position that when the fill method is applied to the left and right eye two-dimensional projections of the stereo image, the seed point falls within each projected two-dimensional projected loop.
  • the result is that for one or both eye projections, it may happen that the exterior of the loop is filled and not the interior.
  • the generated drawings may, by design, contain single loops that twist in three- dimensional space, thus creating several apparent loops in the two- dimensional projections of the transformed loop.
  • the seed point may fall entirely out of the loops, or only fill one of the two- dimensional loops.
  • a single loop with a seed point SP shown in Fig. 20(a) may be twisted into a figure 8 when it is projected onto a plane creating two loops on the plane, shown in Fig. 20(b).
  • the seed point SP may then fall within only one of the loops of the figure 8 as shown in Fig. 20(8), in which case only that portion will be filled.
  • the seed point may fall outside the loop entirely, as shown in Fig. 20(c), in which case the area external to the loop will be colored.
  • Fill masking is a technique where a painted loop that is part of a stereo image is filled for display purposes by processing the loop prior to display in the following manner.
  • Fig. 21(a) illustrates a single eye projection of a loop and rectangle. The entire rectangular area is generated in the color with which the loop is to be filled.
  • the two- dimensional projection of the loop originally drawn by the animator is transferred to the buffer in the proper line color for the loop as shown in Fig. 22(b).
  • a fill of the rectangle is then performed using the seed point and flood fill method discussed above.
  • the seed point is generated just within any corner of the rectangle.
  • the fill consists of a code that makes this bounded region transparent when displayed so that only the loop remains visible in the proper color.
  • the appendix contains the BASIC code for implementing the transformation graphs, space path, segment warps, wind warp, inertia wa ⁇ , and wave wa ⁇ of the present invention.
  • This code is one example of the code that may be utilized and should not be construed as limiting. Those of ordinary skill in the art of will recognize that other code may be used.
  • the invention has been described in greatest detail with respect to the particular embodiments and exemplary applications described above. However, the invention is not limited by this embodiment and examples, but is limited only by the scope of the appended claims. Appendix
  • SeedA AS t3DPomt SeedB
  • t3DPoint SeedC AS t3DPo ⁇ nt SeedD
  • PaintCol AS INTEGER Wc Ln AS INTEGER END TYPE
  • CONST eAddBorderColor &H500 '1280
  • CONST eDeleteBorderColor &H600 '1536
  • CONST eClearBorderColors S-H700 ' 1792
  • CONST eStartEntity &HC00 '3072
  • CONST EMSPagesRequired 82 * 8 '50 normal pages + 32 interlaced pages
  • DECLARE SUB SetUpGlueLoops () DECLARE SUB DefnGrpsOb ⁇ s 0 DECLARE SUB MkScaffold 0 DECLARE SUB DrawBCDPoses () DECLARE SUB F dLngstSeg 0 DECLARE SUB MtchPtsPartO 0
  • DECLARE SUB MrkScaffoldCntr (Messages, WchOb ⁇ , WchPose)
  • DECLARE SUB VerticalText (Text$, y, x)
  • DECLARE SUB ReCntrOb WchObj, PtArray, CenterOfOb 3 AS t3DPo ⁇ nt
  • DECLARE SUB MrkObjCntr Messages, WchPose, WchOb 3
  • DECLARE SUB HiLiLn LnArrayO AS ANY, PtArray, LnNo
  • DECLARE SUB IdentObjects 0
  • DECLARE SUB GetPts PtArray, PtArrayNdx
  • NoOfVelcros COMMON SHARED Magnified, SyncPtlndex, WarpsNamedOK, NoOfWarps COMMON SHARED NoOfScaffoldPts, GlueLoopsYN, SegsOK, SumSegLen, RepeatA COMMON SHARED FmdLngstSegOK, JustifiedOK, WarpsOK, ObjCntrsOK,
  • REDIM SHARED ALns(75) AS LineType REDIM SHARED BLns(75) AS LineType REDIM SHARED CLns(75) AS LineType REDIM SHARED DLns(75) AS LineType REDIM SHARED Group(5) AS GroupType REDIM SHARED Object(3) AS Ob ectType REDIM SHARED AObjCntr(3) AS t3DPoint REDIM SHARED AGrpCntr(5) AS t3DPoint REDIM SHARED MtchPts(50, 7) REDIM SHARED TempSegs(105) AS TempSegType REDIM SHARED Ob 3 FmalPos ⁇ t ⁇ ons(5) AS Ob 3 ectFinalPos ⁇ tType DIM SHARED TransferInfo AS TransferType
  • NoOfFrames Interval 1 570 / (NoOfFrames - 1)
  • LOCATE 3, 1 PRINT "Run Will Be”; NoOfFrames;
  • EndOfAPts GetA(APtsXPg, 0)
  • EndOfBPts GetA(BPtsXPg, 0)
  • EndOfCPts GetA(CPtsXPg, 0)
  • EndOfDPts GetA(DPtsXPg, 0)
  • WchGrp UserChoice("Which Group'", Group(1) Label, Group(2) Label, Group(3) .Label, Group(4) .Label, Group(5) . abel) ELSE
  • ThisObjMoveAndGrpTransOK False WHILE NOT ThisObjMoveAndGrpTransOK
  • WchObj FinlSgs(FoundSeg) .WchObj
  • WchLine FinlSgs(FoundSeg) .WchLme
  • WchGrp ALns(WchLine) .WchGrp
  • QuesS "More Anchored Sections For " + AncRun(AncRunlndex) .Label + "'” ErsMnu
  • ControlGraphOutOfRange True THEN LOCATE 2
  • PRINT "Action Control Graph Was Out Of Range —You Must Redo It”:
  • SLEEP 2 LOOP
  • ControlGraphOutOfRange True
  • SPIAfterEachTrans SyncPtlndex END IF 'grp belongs to i object NEXT 'grp
  • CLS TextS "Path, And Group Actions, For " + Object(I) .Label

Abstract

A system and method for intuitively generating computer-assisted animation utilizes a transformation space in which a computer input device such as a three-dimensional drawing wand is moved to generated contructed poses from a plurality of source poses. The transformation space may be in the form of a tetrahedron with each of the four vertices representative of a source pose. At any point within the three-dimensional volume of the tetrahedron, a constructed pose may be defined based on weighted averages of the four source poses. The animator may create a sequence of animation simply by moving the drawing wand within the tetrahedron. The rate of change of the transformations of the constructed poses is controlled by the rate of movement of the drawing wand but may be altered after the sequence of constructed poses is defined. An additional aspect of the invention relates to the modification of portions of drawings by drawing a 'warp' path in space to specify relative displacement from a reference point. The segment or segments affected, and the extent to which the points that comprise the segments are affected, is then specified. This technique may be adapted to create complex motions and wind, inertia, and wave effects in animated objects.

Description

Title: Computer-Assisted Animation Construction System and Method and User Interface
Field of the Invention
This invention relates to a system and method for creating two and three-dimensional computer-assisted animation, and a simple and intuitive user interface for generating a series of animation images from a relatively few source drawings. Background of the Invention
The field of animation concerns the creation of the illusion of motion by rapidly displaying a sequence of still images, with each image slightly changed from the previous image. In the early years of animation, the drawings were strictly made by hand, which is a tedious and time- consuming process given the large number of drawings required for even a short animation segment. More recently, with the advent of computer graphics technology, computers have been used in the animation process. Animators are often reluctant, however, to depend too heavily on computers for generating drawings because of the noticeable difference between hand drawn figures and objects and computer-generated figures and objects, which appear robotic rather than life-like. More accepted in the animation field are computer systems permitting animators to create drawings on computer display devices using a mouse, drawing tablet or other input device rather than pen and paper. In these systems, computers are often used to assist an animator in creating an animation sequence by generating intermediate animation frames which are placed in between frames drawn by the animator. The frames drawn by the animator are referred to as key frames or poses. The computer generated intermediate frames are referred to as "in-between" frames and are used to transform an image from one key pose to another. The process of generating these in-between poses is often referred to as "tweening" or "in-betweening." Generation of the in-between poses is based on computer interpolation between the animator's key frames. The animator specifies the number of in-between frames based on the complexity of the motion, and the computer generates the in-between frames to create a smooth transformation in the resulting animation sequence. The advantage of this technique is that it eliminates the laborious task of manually generating the individual in-between frames. Computer in-betweening for three-dimensional animation is discussed in U.S. Patent No. 4,600,919 to Stern.
Prior art computer tweening methods are lacking in several respects. First, some prior art tweening systems use simple linear interpolation to generate intermediate poses between key frames. One problem with this approach is that it results in actions in objects that appear "robotic." The problem can be minimized by increasing the number of key poses, but this requires more manually generated drawings and defeats the purpose of computer-assisted tweening. Another problem is that linear interpolation can cause distortion of objects experiencing rotational motion by shortening segments of the objects at certain angles of rotation. A third problem is that discontinuities in the speed of motion often result if i) the number of in-betweens in adjacent intervals is constant, but the distance between key poses is not, or ii) the distance between adjacent key positions is equal but the number of in-between poses in the interval are not. These problems are discussed more fully in D.H.U. Kochanek, R. Bartels, and K.S. Booth, "A Computer System for Smooth Keyframe Animation," Rep. No. CS-82-42, University of Waterloo Computer Science Dept., 1982. Several researchers have developed improvements to the simple linear interpolation technique as discussed in Kochanek et al. One such technique is referred to as the "P-curve." In this process, the animator traces out a motion path along which an object is to move. In addition, to account for transformations in the object as it moves, the animator can specify a selection function to designate which picture of an object is used for any given frame along the P-curve. For example, the object can be a bouncing ball and the animator can specify that as the ball bounces, a drawing showing a compressed ball can be used.
These prior art techniques are cumbersome for animators to use, however, because they are complicated and do not provide a simple, easy-to-use user interface. There is thus a need for a computer-assisted animation construction system and method that permits an animator to create high quality animation simply and intuitively. Summary of the Invention
It is an object of the present invention to provide an improved system and method for computer-assisted generation of animation.
It is a further object of the present invention to provide an improved system and method for computer-assisted generation of animation that creates animated actions more life-like as compared with prior art systems. It is a further object of the invention to provide an improved system and method for computer-assisted generation of animation such that the animator can simply and intuitively in real-time create a sequence of motion using a plurality of animator-created source poses of an object.
It is a further object of the invention to provide animators with direct artistic control of computer-assisted three-dimensional hand- drawn animation, equal to that which they have when hand-drawing two- dimensional animation in the traditional manner.
The system and method of the present invention improves on the known concept of using a computer to interpolate between sequential key poses of an animation sequence through the use of what are referred to herein as "source poses." A source pose is an animator-created drawing of an object used in the present invention to create computer- generated poses of the object for animation. Unlike the prior art concept of key poses, a source pose may, but is not required to be, part of the animation.
The invention has application to both two and three- dimensional computer animation. In the system and method of the present invention, any number of source poses can in theory be specified by the animator, but practically 1-7 source poses would be used. These source poses do not necessarily correspond identically to the appearance of the animated object in any of the resulting animated poses. The source poses are used to construct composite poses used in animation sequences, referred to herein as "constructed poses." In each constructed pose, the object's appearance is constructed from a weighted average of the source poses. A three-dimensional drawing space is provided using a computer- driven stereoscopic viewing system incorporating a computer input device such as a three-axis (6 degree of freedom) position sensor or drawing "wand" which utilizes sensors to track the movement and orientation of the wand in three-dimensional space. The position of the wand is represented by a cursor which is displayed within the three-dimensional drawing space. A predetermined portion of the three-dimensional drawing space, referred to herein as the "pose transformation space," is displayed in the viewing system. In one embodiment, the pose transformation space is a tetrahedron. In this case, four source poses are represented by the tetrahedron, one at each vertex. Each point within the tetrahedron represents a constructed pose defined by a unique combination of the four source poses. The drawing wand is moved to control the movement of the wand cursor within the tetrahedron in order to define the transformation of the animated object. The position of the wand cursor relative to each vertex of the tetrahedron controls the constructed pose at that point in time. The constructed poses are composed of weighted averages of the source poses. The constructed poses are viewed in real¬ time as the wand cursor moves within the pose transformation space enclosed by the tetrahedron, thus providing instantaneous feedback to the animator of the action being created or "scripted." In this manner, an animated object can be made to perform any action which, given the nature of the four source poses, can be specified by a progression of three-dimensional graph points determined by the path of the wand in the pose transformation space, referred to herein as a "transformation graph." In addition, the velocity of the pose transformation may be controlled by the rate of motion of the wand cursor in the pose transformation space. Alternatively, the velocity may be independently controlled by displaying a graphical representation of the relative rate of transformation as a function of position along the transformation graph ~ referred to herein as a "velocity profile graph" or velocity profile for the transformation — to specify the instantaneous rate of transformation. This velocity profile permits an animator to modify the rate of transformation along the transformation graph using the input device.
The actions of different characters and objects and parts thereof may be defined using different transformation graphs, thus providing independent control over the action of the characters in a resulting animation sequence. If less than four source poses are to be used by the animator, a two-dimensional transformation space may be used (e.g, a triangle for three source poses).
A second aspect of the present invention is directed to further modifying constructed poses to provide for greater control over the form and action of computer-generated animated images undergoing some form of motion or transformation, which may be specified as a distortion or "warp" of one or more line segments of a drawing. A point within the drawing is chosen as a reference point, referred to herein as a "warp handle," which will typically be on a line segment of a source pose, but need not be so located. A motion path relative to this reference point — referred to herein as a "warp path" — is then drawn in the drawing space. The warp path defines a motion path in time relative to the reference warp handle, thus generating a set of relative x, y, and z displacements as a function of time. The line segment or segments to be modified by the warp path are then specified by any one of a number of methods, such as pointing and clicking with the drawing wand. In addition, a graph is drawn which defines the degree to which the successive points on the line segment or segments are displaced by the warp path. This graph is referred to herein as a "warp profile graph." The set of relative displacements is then applied to the designated segments, as modulated by the warp profile graph. This general technique, referred to herein as "segment warping," may be modified to create various effects, such as the effect on an object of wind, of inertia, and to create the movement of a wave along the specified segments.
A third aspect of the present invention, referred to herein as "spine warping," creates a number of related segment warps simultaneously. This is accomplished by defining, on each source pose, a single, straight line "spine" extending approximately through the centerline of a group of line segments to be warped. Any of the above- described warps may be applied to the spine and the resulting warp of the spine is appropriately transferred to each point on each of the affected line segments in the group. This provides the animator with a tool for very simply specifying complicated transformations to groups of line segments simultaneously.
A final aspect of the present invention relates to the automatic painting of closed loops (which may represent a surface of an object in a stereoscopic viewing system) drawn in two or three- dimensional space by "flood-filling" the loop (each of the two-dimensional left and right eye projections of the loop in a stereoscopic system). Flood- filling is a technique known in the art of computer graphics. The system and method of the present invention uses a different technique for painting closed loops, referred to herein ad "fill masking." In accordance with the present invention, the animator need only define the color with which the loop is to be filled in a single source pose and the color is maintained in each constructed pose regardless of the distortions the loop undergoes during motion. For each such constructed loop, a two- dimensional geometric shape, which is typically a rectangle, is generated automatically to encompass the loop by making it slightly larger than the loop based on the minimum and maximum x and y coordinates of the loop. The entire rectangle is generated in the fill color of the loop chosen by the animator. Next, the loop outline is transferred to the rectangle in its chosen line color or colors. A "fill" of the area bounded by the rectangle and the line forming the exterior of the loop is then performed, using the traditional flood-fill technique. This filled area is defined to be transparent so that when the resulting rectangle is displayed, the viewable image consists only of the loop in the appropriate filled color. This process is automatically repeated for each of the filled loops which comprise the complete character or object animation. Brief Description of the Drawings
Figs. l(a)-(d) illustrate four source poses of a fish for use in an animation sequence.
Figs. 2(a)-(d) illustrate the four source poses of the fish's mouth of Fig. 1. Fig. 3 is a three-dimensional tetrahedral pose transformation space used to generate the transformation graphs of the present invention.
Fig. 4 is a transformation graph of the present invention for the mouth of a fish drawn in the pose transformation space of Fig. 3.
Fig. 5 is a transformation graph of the present invention for the eye brows of a fish drawn in a three-dimensional tetrahedral pose transformation space.
Fig. 6 is a transformation graph of the present invention for the body and fins of an animated fish, using only two vertices for a three- dimensional tetrahedral pose transformation space. Fig. 7 is a transformation graph of the present invention for the eyes of an animated fish, using only two vertices for a three- dimensional tetrahedral pose transformation space.
Figs. 8(a)-(f) illustrates the animation frames resulting from the combination of the transformation graphs of Figs. 4, 5, 6 and 7. Figs. 9(a)-(d) illustrate the velocity profiles for the transformation graphs of Figs. 4, 5, 6, and 7.
Figs. 10(a)-(d) illustrate the velocity profiles for the transformation graphs of Figs. 4, 5, 6, and 7 adjusted by the use of sync points.
Figs. ll(a)-(f) illustrate the advantage of using match points in constructed poses. Figs. 12(a)-(b) illustrate the segment warp technique of the present invention.
Figs. 13 illustrates a warp profile graph used for the segment warps shown in Fig. 12(a).
Fig. 14 illustrates the resulting motion created by the segment warp defined by Figs. 12-13.
Fig. 15 illustrates an angel wing as an example of the problems with prior art in-betweening systems.
Figs. 16(a)-(c) illustrate how the problem of Fig. 15 is corrected using the segment warp technique of the present invention. Fig. 17(a)-(f) illustrate the wind effect that can be achieved using a variation of the segment warp of the present invention.
Figs. 18(a)-(e) illustrate the wave effect that can be achieved using a further variation of the segment warp of the present invention.
Figs. 19(a)-(b) illustrate the spine warp of the present invention.
Figs. 20(a)-(c) illustrate the problems with prior art seed point and flood-fill techniques for filling loops with color.
Figs. 21(a)-(c) illustrate the fill masking technique of the present invention for overcoming the drawbacks of prior art seed point and flood-fill techniques.
Detailed Description of the Invention
The invention utilizes computer systems for drawing and viewing stereoscopic (three-dimensional) images and applies such systems to the field of computer-assisted animation. Systems for drawing in three- dimensional space are known in the art of computer graphics. One example of such a system is described in Schmandt, C, "Interactive Three- dimensional Computer Space," SPIE Vol. 367, pp. 155-59 (1982). The system described therein utilizes an ordinary CRT display monitor which is viewed by the user through a half-silvered mirror placed at a 45° angle with the monitor. The user is provided with a three-dimensional drawing space beneath the mirror and a "wand" for drawing in the three dimensional space. The wand used in the described system utilizes magnetic position sensing technology to provide its x, y, and z position as well as its attitude. The three dimensional (stereoscopic) effect is achieved by the user viewing the CRT through special glasses utilizing lead lanthanum zirconate titanate (PLZT) ceramic wafers which function as electrically operated shutters. The left and right eye views are effectively time-multiplexed by displaying them on alternate raster scans. The operation of the glasses is synchronized with the video signal to allow one eye at a time to view the proper image on the CRT providing the three- dimensional effect. This technique is sometimes referred to as field sequential three-dimensional imaging.
An alternate means for providing a three-dimensional view is through the use of anaglyph (two color) left and right eye image separation. A limitation of this implementation is that the drawn images are monochrome, whereas the field sequential technique allows for color images. A third means for providing left and right eye image separation is through the use of polarizing filters where the left eye image is polarized one way and the right eye image polarized another. The polarized images are normally viewed by projecting them onto a screen and viewing them through appropriately polarized glasses. Although the invention has application to both two and three-dimensional computer-assisted animation systems, the invention will be described herein with regard to three-dimensional animation. It will be readily apparent to those of ordinary skill in the art that the same concepts may be applied to standard two-dimensional animation. The present invention requires a three-dimensional stereoscopic viewing system using one of the above techniques to permit the animator to draw directly in three-dimensional space. In a preferred embodiment, the three-dimensional drawing and viewing system utilizes a computer workstation monitor and field sequential left and right image separation using synchronized liquid crystal shutter glasses.
The animator uses an electro-mechanical device referred to as a drawing "wand" to draw the three-dimensional drawings. The wand is actually a three-dimensional location tracker, which is available from several suppliers, including Ascension Technologies, Inc. In one embodiment of the present invention, a drawing wand referred to as the "Flock of Birds" by Ascension is used. The device uses electromagnetic waves to provide its position and orientation in three-dimensional space. Liquid crystal shutter glasses are available from, among others, Stereographies Corp. A high resolution 17-inch monitor by Nanao has been found to the best from the standpoint of image resolution and stability as well as ease of use. When the user moves the wand in space a cursor moves within the drawing space under control of the wand and when a button on the wand is pushed, a continuous line in three- dimensional space following the path of the cursor is drawn. The line is composed of a series of closely-spaced points joined by very short line vectors to form what appears to be a single, continuous smooth line. It is important that the system provide for vector-based as opposed to bit¬ mapped drawings, so that the line segments drawn by the animator may be mathematically defined and processed by the computer.
The present invention relates more specifically to several novel ways for transforming only a few drawings to create animation sequences. The invention incorporates several techniques for creating computer-assisted animation that are simple for an animator to use and provide the animator with control over the form and motion of animated objects that is lacking in existing computer animation systems.
In general, animation consists of the transformation of images in time to create the appearance of motion. The invention discloses several techniques for generating transformations in a manner that is simple and intuitive to use for an animator, and which also provides the animator with a great degree of control over the way in which images are transformed in order to provide realistic, life-like motion.
The first aspect of the invention relates to a concept referred to as transformation graphs which permit the animator to simply and intuitively generate different, computer-constructed poses of animated objects based on source poses drawn by the animator. A three- dimensional transformation graph may be implemented as follows (although two-dimensional graphs may also be used). The animator is provided with an image through the three-dimensional viewing system of a polyhedron, such as a tetrahedron. The tetrahedron is shown in the three-dimensional drawing space using well-known techniques for generating and displaying left and right eye two-dimensional images to create a three-dimensional effect. The tetrahedron displayed is only a guide for the animator and does not become part of the drawings used in the animation. Each of the four vertices of the tetrahedron is defined to represent a source pose hand-drawn by the animator. Each source pose consists of a vector-drawn representation of an animated object or portion of an object. Alternatively, source poses may be generated by prior-art computer animation systems and utilized in the present invention.
For example, four poses of a figure can be drawn, each with different positions of the legs. The four poses may then be represented at each of the four vertices of the tetrahedron. These four poses themselves are not sufficient to realistically represent motion. A sufficient number of poses to create realistic motion are constructed from these four poses. These constructed poses are based on composites of the four source poses. The constructed poses are defined by the animator by moving the wand in the three-dimensional space within the tetrahedron, referred to as the pose transformation space. The motion of the wand is tracked in time as it is moved within the tetrahedron and a three-dimensional graph of the wand's position traced out within the pose transformation space is generated. Each point on the graph represents a pose constructed from the four source poses. The number of points depends on the sampling rate of the drawing wand. The generation of constructed poses in this manner provides for continuous transformations of images in a manner simple for the animator to use. The animator "scripts" the action of a character or object simply by moving the wand cursor within the transformation space. The graphs so created are referred to as transformation graphs because they define a continuously transforming series of poses constructed from the source poses. Different actions of the figure can be generated by different paths of the wand cursor in the transformation space. For example, with one set of four source poses with different positions of the legs, the figure referred to above can be made to "mark time," walk forward, walk backward, walk with big steps, little steps, etc., and these actions can be continuously created in any sequence simply by manipulating the wand. The transformation graphs are generated as follows. Using the example of a tetrahedral drawing space, at each point along the transformation graph, the constructed pose associated with the point is defined by the location of the point in space relative to the four vertices of the tetrahedron. The closer the point is to a vertex, the more the source pose assigned to the vertex will affect the appearance of the constructed form. In one embodiment, a simple linear weighting scheme is used so that the weight of each vertex or source pose is inversely proportional to the distance from the graph point to the vertex. For example, if a graph point is, in three-dimensional space, a distance x away from the first vertex (vl), 2x from the second (v2), 3x from the third (v3), and 4x from the fourth (v4), each of the four source poses associated with the four vertices will be weighted accordingly. In other words, the points defining the line segments of the constructed pose will be placed in accordance with a weighted average of the positions of the points in each of the four source poses. It should be noted that, utilizing the transformation graphs of the present invention, the source poses need not actually be part of the resulting motion sequence, which may utilize only composites of the source poses. In other words, the transformation graph need not anywhere touch a vertex. It should also be noted that, unlike the key poses of prior transformation techniques, there is no predefined time sequence for the poses. The transformation graph can move through any path in the pose transformation space in any sequence desired by the animator.
In a preferred embodiment, the tetrahedron is modified so that each edge is not a straight line but the arc of a circle centered at an opposite vertex and with a radius equal to the length of one side of the tetrahedron. The reason for this is as follows. Each vertex represents, by definition, a source pose, so that the weight of any of the other three vertices is defined to be zero at that vertex. In other words, the contribution of a source pose goes to zero when the distance of the vertex to which that pose is assigned to the point on the transformation graph is equal to the length of an edge of the tetrahedron. If an edge of the tetrahedron is traversed, the resulting constructed pose will be composed primarily from the two vertices at each end of the edge. However, the remaining two vertices will have non-zero effects because the distance to these vertices will diminish as the edge is traversed. Thus, it would not be possible to script a motion sequence constructed from only the two source poses represented by the two vertices at each end of the edge. Although in most cases the contributions of the other two vertices might not be noticeable in the resulting animation, any such potential problem is solved by utilizing the circular arcs in order to maintain a constant distance from each of the two non-contributing vertices as a path between the two vertices at the ends of the arc is traversed. It will be apparent to those of ordinary skill in the art that the shape of the transformation space need not be exact as it is only intended to be a guide for the animator in scripting action sequences. The system may readily be programmed so that if, for example, the animator moves the wand slightly inside or outside the tetrahedron as opposed to following precisely along the edge, it will be recognized as motion that is comprised only of the two source poses at the vertices. The transformation graph aspect of the invention may be further described with reference to the figures. Figs. l(a)-(d) illustrate four possible configurations for the facial expressions of an animated fish. For clarity, the fish is drawn without illustrating the z-component and therefore appears two-dimensional, but is meant to depict a fish in a three- dimensional stereoscopic drawing. As can be seen in Fig. 1, there are four different source poses for the fish's mouth as shown in Fig. 2 - frown (Fig. 2(a)), smile (Fig. 2(b)), small mouth (Fig. 2(c)), and big mouth (Fig. 2(d)). In each of Figs. 2(a)-2(d), four points, A-D are shown. Each of the four source poses of the mouth may be assigned to one of the vertices (labelled a, b, c, and d) of a tetrahedron shown in Fig. 3 consisting of four planes: abc, bed, acd, and abd. For example, at a point m midway along the line cd, the constructed pose defined by this point (a medium-sized mouth) will be formed primarily from the source poses at vertices c (small mouth) and d (large mouth). Each of the points A,B,C, and D in Figs. 2(c) and 2(d) (as well as all the points along the line segment) will be mapped to a location (x,y coordinate) approximately midway between their locations at the vertices c and d.
Fig. 4 illustrates a transformation graph drawn by the animator (using the wand) which controls the transformation of the shape of the mouth. Starting at point S (which is essentially a frown) lying approximately in the plane defined by vertices abc, the transformation graph progresses toward vertex c to point 1, then toward vertex b to point 2, then upward along the line bd to point 3, then downward on the plane abd to point 4, then along the line ab to the end point E. Although the transformation graph is shown essentially along the surfaces of the tetrahedron for purposes of illustrating it in a two-dimensional drawing, the graph may be drawn through any part of the volume enclosed by the tetrahedron. As the animator draws the path, the computer calculates, based on the sampled position of the wand in space, the location of the cursor from each vertex and then draws the resulting constructed pose. A subset of the points (every nth point) making up the constructed pose is selected for display so that the series of constructed poses can be seen in real time and the animator can view the motion he is scripting. This is done essentially in real time so that the animator can view the motion he is scripting as he moves the wand to control the cursor movement. Fig. 5 illustrates a three-dimensional transformation graph for another element of the fish drawing, the eye brows, Fig. 6 for the fish's body and fins taken together, and Fig. 7 for the eyes. In Fig. 6, there are only two source poses used at i and j. The other two vertices, k and 1, are also assigned the pose assigned to vertex i as a programming convenience. The transformation graph could actually be scripted along a one-dimensional line as only two source poses are used. The same is true for Fig. 7, which illustrates the transformation graph for the eyes along the line m-n, although tetrahedron mnop is shown.
If a sequence using only three source poses is to be generated, a triangle on a plane may be used as the pose transformation space. Similarly, a sequence using only two poses can be scripted on a pose transformation space consisting simply of a line with one pose assigned to each end of the line. On the other hand, if more complicated motions are to be scripted using a greater number of source poses, the pose transformation space may be readily extended by utilizing the existing capability of the drawing wand to sense orientation. Each of the three components — pitch, roll, and yaw — may represent an additional source pose thus providing three additional source poses. This allows for a six dimensional pose transformation space in which any possible combination of seven source poses can be defined. Other inputs, such as foot-pedals, could provide for additional source poses. In such a case, the cursor in the pose transformation space would only reflect four poses; the degree of effect of the other inputs could only be seen in the resulting constructed pose. In addition to controlling how the poses of animated objects change, the transformation graphs are also used to control the rate of transformation, which correlates to the apparent speed of the action produced in the animated object in the resulting animation sequence. Because the drawing system is sampling the position of the wand at a fixed rate, the position of the wand as a function of time is known. Therefore, the rate of movement of the wand is known and may be used to control the rate or speed of the scripted transformation.
When a transformation graph is drawn, the points of the graph are stored. These graph points are equally spaced in time. Therefore, the spacing of graph points in the pose transformation space depends on the speed with which the animator moves the drawing wand and their spacing controls the rate of change of the animated action. If the animator draws the graph in real time, each point may correspond to a frame of animation. Alternatively, the animator may first define the number of frames desired for the sequence and then draw the graph in "slow motion." In this case, the number of frames in the animation sequence will be less than the number of graph points generated. Similarly, the transformation graph may be drawn faster than real time so that the number of frames will be greater than the number of graph points. In these latter two cases, the transformation graphs are interpolated accordingly, to create the number of frames selected by the animator. The stored frames may then be played back at the rate at which they will be seen by the viewer (which is typically 24 or 30 frames per second) so that the animator can determine if the speed of the motion is appropriate. They can also be played back at faster and slower frame rates for analysis.
To facilitate adjustments to the speed of the action, the animator is provided with a graphical representation of the rate of transformation of the poses throughout the sequence of poses, referred to herein as a "velocity profile" for the transformation graph. The velocity profile shows the relative rate of change of the poses along the transformation graph. Without changing the sequence, the animator can adjust the velocities along the transformation graph using, e.g., a point, click, and drag action known in the art to modify the velocity profile, or by redrawing the velocity profile entirely. When the velocity profile is so changed, the spacing of the transformation points along the transformation graph is adjusted by interpolation in such a manner that the animation sequence still occurs over the correct number of frames. For example, if the relative speed of the action is increased in a portion of the transformation graph, it will be appropriately decreased in the remaining portion of the transformation graph.
Figs. 8(a)-(f) illustrate the frames of animation resulting from the combined transformation graphs in Figs. 4, 5, 6 and 7. In Fig. 8(a) (point S on the transformation graphs), the fish is approaching a piece of food which he notices in Fig. 8(b) (point 1). The sequence then continues until the fish swallows the food. Figs. 8(c) through 8(f) correspond to points 2, 3, 4, and E in Figs. 4, 5, 6 and 7. The points relate to different frames of animation, i.e., different points in time during a transformation sequence. For example, as shown in Figs. 8(a)-(f), times 0, 1, 2, 3, 4, and E may correspond to frames 1, 40, 90, 150, 180 and 240, respectively.
Fig. 9(a)-(d) show the velocity profiles of the transformation graphs for the mouth, eyebrows, body, and eyes, respectively, which are illustrated in Figs. 4-7, as they might be after recording the respective transformation graphs. The x-axis indicates time or number of frames and the y-axis the instantaneous rate of transformation of the constructed poses. A zero rate of transformation means that the image is static; a flat, non-zero rate that the image is transforming at a constant rate, a positive slope means that the rate is increasing and a negative slope that the rate is decreasing. For each velocity profile in Figs. 9(a)-(d), six points are shown, i-vi, each corresponding to a frame in an animation sequence. For each of these points, the legend adjacent to each of the graphs indicates the pose associated with the frame. The velocity profiles of Figs. 9(a)-(d) may be displayed after an animator has generated the respective transformation graphs to indicate the rate of transformation as drawn by the animator. Note that as shown, the points i-vi do not correspond to the same frame in each of the four velocity profiles. The animator may manually modify the profile by "nudging" (using the wand cursor to push parts of the graph into a different shape) a portion of the graph or by redrawing the entire graph to adjust the transformation rate as desired.
If all the transformations in a drawing are controlled by the same transformation graph, the effect may be mechanical and not life-like. By dividing a drawing into groups and drawing a separate unique transformation graph for each, a complex life-like action can be created. However, when a composite drawing is generated from different groups of elements controlled with different transformation graphs, there may be a need to coordinate the action of the different groups before they are compiled into frames of animation. For example, as originally drawn, the velocity profiles for the mouth, eyebrow, body, and eye transformations are as shown in Figs. 9(a)-(d). It may be seen in Figs. 9(a)-(d) that these velocity profiles produce constructed poses of the mouth, eyebrows, body, and eyes that are not synchronized in time compared to the desired relationships of the different body parts as shown in Figs. 8(a)-(d). The differences are exaggerated for clarity. For example, at the point where the mouth of the fish is large, the eyes and eye brows must be portrayed as squashed toward the top of the head of the fish. As originally produced (as shown in the unmodified velocity profiles of the transformation graphs), the mouth is large at point iv in Fig. 9(a), approximately frame 80, while the eyes and eyebrows are squashed at frames 60 and 140, respectively. The present invention facilitates the synchronization of the actions of different groups of elements as follows. While drawing the transformation graph for, e.g., the eyes, the animator may simultaneously view the played-back action of the mouth, which was scripted using a transformation graph and stored. In this manner, the animator may manually synchronize the actions of the elements. Repeated "takes" may be used until the animator is satisfied with the synchronization. The playback may be in real time or, if desired, in slow motion to facilitate synchronization. Alternatively, this may be done using the concept of synchronization points or "sync" points. Sync points are used to specify that at a particular point in time during a sequence (i.e., a particular frame of animation within a sequence of frames), a group of elements will have a selected form, such as the open mouth of the fish. In a preferred embodiment, a frame identifier is first assigned to the designated frame (point in time) where the sync point will occur. Next, the constructed pose to be assigned to the selected frame is chosen by using a pointing device (such as the drawing wand) to scroll along a linear scroll bar representative of the entirety of the transformation graph. As the animator moves the cursor along the scroll bar, the constructed pose corresponding to that point on the transformation graph is displayed. In addition, the position of the cursor on the actual transformation path is displayed as well. When the desired constructed pose is displayed, a wand button is clicked to indicate that that pose is to be synchronized with the selected frame.
In a second group of elements to be coordinated with the first group, the corresponding constructed pose (i.e., squashed eyes) is chosen by the animator in the same manner. This pose is assigned the same frame identifier as the frame in the transformation graph for the mouth so that it too is synchronized with the selected frame. In this manner, the selected mouth pose and the corresponding eye pose will occur in the same frame and therefore the same point in time. The sequence of poses along the transformation path is not affected. However, in order to force a selected pose to occur at a particular time, the velocity of the transformation must be adjusted. This is done by reducing or expanding the number of frames between each sync point, as required. This is done by interpolation, so that in so far as possible the original velocity profile is maintained. However, depending on the velocity profiles, it may be difficult to maintain the shape of the velocity profile in the vicinity of one or more sync points without creating a discontinuity in the motion. In this case, the resulting animation sequence may be played back to determine if there is a discontinuity noticeable to a viewer. In general, sudden changes in the velocity of a transformation are not detectable by the viewer. However, if it is, the shape of the velocity profile may be adjusted or re-drawn by the animator to eliminate the discontinuity. It is likely that there will be multiple sync points used along a transformation graph. The same procedure is followed for each such point.
Figs. 10(a)-(d) illustrate the sync point concept. The sync points are labelled SP1-SP4. These might, for example, correspond to frames 40, 90, 150, and 180 as shown in Figs. 8(a)-(f). Fig. 10(a) is the velocity profile for the transformation graph for the mouth of the fish and Figs. 10(b)-(d) the eyebrows, body, and eyes, respectively. As in Figs. 9(a)- (d), the velocity profiles in Figs. 10(a)-(d) correspond to the transformation graphs of Figs. 4-7, respectively, but in this case have been re-generated using sync points. In the animation sequence, the large (wide open) mouth must occur when the eyes of the fish are squashed towards the top of its head and the small mouth when the eyes are wide open. Therefore, point SP1 along the transformation graph is assigned to the point in time when the mouth is small and point SP3 when the mouth is large. The velocities along the transformation graph are then adjusted (by interpolation) so that point ii in Fig. 9(a) (small mouth) has been shifted later by 20 frames, and point iv (large mouth) has been shifted later by 70 frames, to occur at frames 40 and 150, respectively. Similarly, point SP2 (frame 90) is assigned to the point in time when the first smile occurs and SP4 (frame 180) when the second smile occurs (points iii and v in Fig. 9(a), respectively). All the other elements are similarly adjusted, so that proper synchronization occurs, as shown in Figs. 10(a)-(d), and the desired relationships of the different features as shown in Figs 8(a)-(f) are obtained. Sync points may also be used to properly synchronize the action within a constructed pose transformation sequence to a sound track.
Segments of the source poses may be mapped onto one another using match points to avoid undesirable constructed poses. The use of match points is known to those of ordinary skill in the art and is briefly described as illustrated in Fig. 11. Match points break up lines into segments so that the weighted averaging discussed above to calculate point locations occurs along corresponding segments in each pose. Figs. ll(a)-(c) represent a profile view of a character's head with a growing nose. Of course, the intention is that the head maintain the same shape as the nose grows. However, if the source poses shown in Fig. 11(a) and 11(c) are used to generate the constructed pose in Fig. 11(b), the image is distorted. In order to prevent such distortion, match points A and B are assigned as shown in Figs. ll(d)-(f) so that the proper shape of the head is mamtained in the constructed pose Fig. 11(e). The match points cause the weighted averaging to take place along two related segments of the source poses. Therefore, because the head portion has the same form in the two source poses in Figs. 11(d) and 11(f), the head is also the same form in the constructed pose. Match points C and D shown in Figs. ll(d)-(f) cause the nose to maintain its shape as it elongates and shrinks. Without these points, the nose could appear somewhat pointy as in Fig. 11(e) at some point in the transformation.
Table 1 is one embodiment of the pseudo-code for calculating a constructed pose from the four source poses of a tetrahedron. Table 2 is one embodiment of the pseudo-code for creating an animated sequence from the source poses and a transformation graph.
Table 1
Const MaxLineLength = 1000; ( **»*««*** Definition of a Point
Type PomtType = Record
X, Y, Z Single, End,
{ *****»«•* Definition of a Line *******•* } Type LineType = Record
NoOfPoints . Integer;
Point Array [1..MaxLineLength] of PomtType; End,
< * — * * »*» •»» —}
{ ) The following routine calculates a constructed pose from four source poses
It has two different uses 1) for visual realtime feedback when the animator is creating the transformation graph and 2) as a subroutine when playing back the recorded animation sequence for animator review
This simple example works for drawings made up of a single line, it would be put in a larger loop for a multi-line drawing.
The four source poses must previously have been "aligned" de they each must contain the same number of points and point N in pose A must correspond to point N in poses B, C and D This is done using "Match Points "
Procedure CalculatePose
(Var PoseA, PoseB,
PoseC PoseD LmeType , { The four source poses ) Var CalcPos . PomtType ; { Pos in tetrahedron to calc for) Var DestPose LineType) , { Resulting pose }
{ Local function to get distance from the point to a vertex of the tetrahedr.) Function DistToVertex (Var PI, P2 . PomtType) Single. Begin
DistToVertex = Sqrt UP1.X - P2.X)Λ2 + (Pl.Y - P2 Y) " + (PI Z - P2 Z)Λ2), End,
Var DistA, DistΞ DistC, DistD, TotalDist . Single, ProportionA Proportions, ProportionC, ProportionD PropScalmg Single, Begin
{*.**.*»**»».„., Qgt Distance to each Vertex )
DistA = DistToVertex (CalcPos, VertexA) , {Assumes vertices defined elsewhere) DistB := DistToVertex (CalcPos, VertexB) ; DistC = DistToVertex (CalcPos, VertexC) ; DistD = DistToVertex (CalcPos, VertexD) ;
{*«*****•♦♦*♦.. use them to calc contributing proportion of each source pose} TotalDist := DistA + DistB + DistC + DistD; ProportionA = TotalDist / DistA, ProportionB = TotalDist / DistB; ProportionC = TotalDist / DistC; ProportionD = TotalDist / DistD,
{*•**•*••*•*•-<• scale the proportions to total one )
PropScalmg = ProportionA + ProportionB + ProportionC + ProportionD,
ProportionA = ProportionA / PropScalmg, ProportionB := ProportionB / PropScalmg, ProportionC .= ProportionC / PropScalmg; ProportionD := ProportionD / PropScalmg,
,*....*♦»♦».♦» caιcuiate the new pose ) DestPose.NoOfPoints := PoseA.NoOfPoints; For I = 1 to PoseA.NoOfPoints do Begin
DestPose.Poin [I] .X := ProportionA * PoseA.Point[I] .X +
ProportionB * PoseB.Point[I] .X + ProportionC * PoseC.Point[I] .X + ProportionD * PoseD.Point[I] .X; DestPose.Point[I] .Y := ProportionA * PoseA.Point[I] .Y +
ProportionB * PoseB.Point[I] .Y + ProportionC * PoseC.Point[I] .Y + ProportionD * PoseD.Point[I] .Y; DestPose.Poin [I] .Z .= ProportionA * PoseA.Poin [I] .Z +
ProportionB * PoseB.Point[I].Z + ProportionC * PoseC.Point[I] .Z + ProportionD * PoseD.Point[I] .Z, End;
End;
Table 2
{ ********* Definition of a Line ********** } Type LineType = Record
NoOfPoints . Integer;
Point : Array [1..MaxLineLength] of PomtType; End;
{ ********* Definition of an Animated Sequence Type AnimatedSeqType =
Array [1..NoOfFrames) of LineType;
This routine computes the frames of composed animation from four source poses and a transformation graph.
********#*★* Procedure CreateSe uence
(Var PoseA, PoseB,
PoseC, PoseD LineType, ( The four source poses ) Var TransGraph LineType; { Trans. Graph is 3ust a line)
NoOfFrames Integer; { Number of frames to create ) Var DestSequence AnimatedSeqType) { Resulting sequence }
Var FramePomts : LineType;
Begin
{.*...********• convert T-Graph to an array of Frame Points based on timing ) FramePointsFromTransGraphTiming (TranformationGraph, NoOfFrames, FramePomts)
{*******...**.* Allow user to adjust the timing manually } While not ChecklfUserHappy (FramePomts) LetUserFixCurve (FramePomts) ;
{....***»*».... calculate each frame ) For I = 1 to NoOfFrames do
CalculatePose (PoseA, PoseB, PoseC, PoseD, FramePomts [I] , DestSequence[I] ) End;
{..*.....
{ { Sub-routine to convert a transformation graph to an array of Frame Points { Each frame point is a point on the same 3-space l ne as the Transformation { Graph, distributed along the line so that the action timing appears natural. (
»*****,
Procedure TransGraphToFramePo ts
(Var TransGraph LineType; { Transformation Graph } NoOfFrames Integer; { Number of frames needed Var FramePomts LineType) , { Frame points created )
Var Units : Integer;
Fraction, Po tToUse Single; Begin
FramePomts .NoOf Points NoOfFrames;
{***.*...*.,*** Fιrst and Last Points are fixed )
FramePomts.Po t[1] = TransGraph.Point[1] ,
FramePomts.Point[NoOfFrames] •= TransGraph.Point[TransGraph.NoOfPoints] ;
r*.************ start by using the timing from when Trans. Graph was drawn For I := 2 to NoOfFrames - 1 do Beg
{ Find a point partway along some line segment in the Trans Graph) PomtToUse := (1-1) /(TransGraph.NoOfPoιnts-1) ; ( A real number ) Units := Trunc (PomtToUse); Fraction = PomtToUse - Units;
FramePomts.Point[I] .X = TransGraph.Point[Units] .X +
Fraction * (TransGraph.Point[Unιts+1] .X - TransGraph.Point[Units] .X) , FramePomts.Point[I] .Y -= TransGraph.Point[Units] -Y +
Fraction * (TransGraph.Point[Unιts+1] .Y - TransGraph Point[Units] .Y) FramePomts.Point[I] .Z := TransGraph.Point[Units] .Z +
Fraction * (TransGraph.Point[Unιts+1] .Z - TransGraph Poin [Units] .Z) , End; End;
The system and method of the present invention also provides for the tying together of different, separately transformed groups of line segments by specifying an attach point on one group of elements to which another group is connected. This feature is useful in the case where different groups of elements experience different motions, but one group is in reality attached to the other, such as in the case of the head and body of a person. This feature is implemented by specifying a first group of elements as the master and a second group as the slave. In the above example, the master would be the body and the head the slave. Techniques for relating the locations of animated groups in this manner are known to those of skill in the art in the field of computer animation. If an animation sequence requires a very complex set of actions to be scripted -- more than can be constructed from a convenient number of poses ~ a transformation graph through two or more pose transformation spaces may pass through a common vertex of the tetrahedra to generate a continuous motion sequence. In this manner, for example, an action is scripted inside a first tetrahedron and then through a vertex which is common between a first tetrahedron and a second tetrahedron (which have a common source pose at that vertex). The animator then continues the transformation graph in the second tetrahedron which has three different source poses associated with its other vertices. Similarly, the second tetrahedron may connect with a third tetrahedron and so forth. Linking of pose transformation spaces in this manner enables complex series of actions to be defined by one continuous "script." In addition to linking pose transformation spaces at a common vertex, the endpoint constructed pose of a motion sequence, which need not be a source pose, may be used as one of the source poses in the transformation space for a second motion sequence. The transformation graph for the second motion sequence is started at the vertex associated with that source pose, so that the action is continuous and seamless when the two sequences are joined together. The transformation graphs may be stored and are not uniquely associated with specific source poses -- the same transformation graph representing, e.g., a walking action, may be applied to control the animation sequence for different sets of source poses representing different characters. Similarly, source poses can be stored for use with different transformation graphs.
The animation sequences generated by the transformation graphs may themselves be represented in a tetrahedral transformation space in order to generate a single output animation sequence. For example, four different perspective views (e.g., 90° apart) of a walking action may be created by generating four sets of constructed poses. The four sets of constructed poses may be generated by drawing a transformation graph for one of the perspective views, using four source poses for that perspective view, and then using the same transformation graph for each of the other three pose transformation spaces associated with the other three perspective views. In this manner, synchronization of the four sets of constructed poses is automatic.
Each set of constructed poses is then assigned to one vertex of a tetrahedron, which in this case may be considered a perspective transformation space rather than a pose transformation space. Rather than each vertex representing a single, fixed source pose, the source pose at each vertex varies as a function of time, i.e., it is determined by the constructed pose for that vertex at any given point in time. A transformation graph is then drawn within this tetrahedron to specify the contribution each constructed pose makes at each point in time during the transformation, to the final single constructed pose at that point. At each point along the transformation graph, the final constructed pose is determined by a composite of the four source poses, except that each source pose actually represents a different perspective of the same pose. Therefore, the movement of the wand only changes the perspective of the action, not the transformation of the object itself, which has already been defined by the sets of constructed poses. In this manner, a transformation graph can be generated representing a continuous walking action with a continuous change of the viewer's perspective on that action to simulate, for example, a camera panning around an object.
The aforedescribed transformation graph technique for scripting motions is a significant improvement over existing computer animation systems. Simply by manipulating a wand in a three- dimensional drawing space, an animator can create long and complex motions using a user interface that allows such motions to be generated in an intuitive manner as a "performance," somewhat as a puppeteer would control the actions of a puppet, and to view the motion in real time. The advantage of this technique is most significant in three-dimensional computer-assisted animation, where creating even a single pose, much less an entire sequence, using existing techniques is complicated and time consuming. For two-dimensional animation, the technique may be used to produce long sequences of two-dimensional animation with little effort. In typical computer animation systems, both the position in space and the transformation of an object are represented simultaneously in a pose. The system and method of the present invention provides the flexibility to separate the transformation of an object from its path in space. In this case, the wand may be used to generate a path in space (referred to as a "space path") for a character or object separately from defining a pose transformation graph. The path in space has an associated velocity graph, which may be modified as described above by adjusting or redrawing it, or through the use of sync points.
A second aspect of the present invention is referred to as "segment warping" and is also directed to further modifying constructed poses to provide for greater control over the form and action of animated images. Segment warps are described as follows. A point within the drawing space, referred to herein as a warp displacement reference point or "warp handle," is chosen, which will typically be on a line segment of a source pose, but need not be so located. The function of the warp handle is to serve as a reference point for a motion path relative to this point, referred to herein as a "warp path." The warp path is drawn by the animator in real time or in slow or fast motion. The warp path defines, for each segment or segments to be modified by the segment warp, the relative displacement of the warp handle from its starting point. The line segment or segments of a drawing to be modified by the warp path are then specified by any one of a number of methods, such as pointing and clicking with the drawing wand. In addition, a graph, referred to herein as a "warp profile graph," is drawn which defines the degree to which the successive points on the line segment or segments are displaced by the warp path. The segment warp technique is best described with reference to a specific example. In the fish shown in Fig. 12(a), match points are placed on the fish body and tail at points labelled MP1, MP2, MP3, and MP4. A warp handle, H, is then placed on the segment between MP2 and MP3. The three segments, MP1-MP2, MP2-MP3, and MP3-MP4, are then identified as the segments to be warped. Fig. 12(b) illustrates the warp path, shown as the dotted line with arrows indicating direction. In this example, the warp path represents the back and forth motion of a fish's tail and is represented by a series of arcs. The warp path is not part of the drawing itself and is not shown in the final animation. The path is shown moving toward the first extreme EX1, then toward an opposite extreme, EX2, then back toward the first extreme EX1 again. A warp profile graph is then drawn for the three segments as shown in Fig. 13. The warp profile graph defines the relative effect of the warp path of Fig. 12(b) on each successive point along the selected line segments. As shown in Fig. 13, the effect of the warp on segment MP1-MP2 is zero at MP1 and increases to 90% at MP2, stays constant at 90% for segment MP2-MP3, and varies from 90% at MP3 to 0% at MP4 for segment MP3-MP4. This means that, for example, at any point in time, the displacement of the points along segment MP2-MP3 will be 90% of the relative displacement of the warp handle from its initial position at that point in time. In other words, if at a particular point during the warp the relative displacement of the handle from its initial position is 1.0 units of length in a z direction (into the paper), 0.4 units in an x direction (horizontal), and 0.1 units in a y direction (vertical), the displacement of all the points along the segment MP2-MP3 from their initial positions will be 0.9, 0.36, and 0.09, respectively. The points along the segment MP1-MP2 will not be displaced at all at MP1, will be displaced progressively more towards MP2, until at MP2 the displacement is 0.9. The effect along MP3-MP4 will be reversed.
Because segment warps simply represent point displacements for the points along selected line segments, they are additive -- multiple segment warps may be applied to the same segment or segments. The effect of the segment warp on the three segments is shown in Fig. 14. At point Exl, the tail is at its maximum displacement along the arc defined by the warp path. The end of the tail, segment MP2- MP3, is displaced to its maximum extent out of the paper (toward the observer). Similarly, at point Ex2, segment MP2-MP3 is displaced to its maximum extent into the paper (away from the viewer.
Rather than defining a warp profile graph as shown in Fig. 13, the animator may specify the relative displacement of the points along the line segment in any of a number of ways, such as by varying the thickness, brightness, or color of the selected segment. It will be recognized by those of skill in the art that the segment warp technique provides a powerful and intuitive tool for animators to create complex motions very simply. By specifying the warp handle on the vertical segment of the tail MP1-MP2 as shown in Fig. 12(a), the animator can, in effect, "grab on" to the tail with a drawing wand and move it back and forth in real time, exactly as it is intended that the final motion should appear. Thus, subtle differences in the timing, direction, and extent of animated motions can be quickly and simply produced. The rate and coordination of the motion with other motions of the object (i.e., transformations), may be controlled using the previously described velocity profiles and sync points.
A further example of the utility of the segment warping concept may be explained with reference to another application. In prior art computer animation systems, in-between frames are frequently generated by the computer by linearly interpolating between line segments in the drawings of the two source poses. However, interpolation can sometimes result in unrealistic motions. One situation where this occurs is where the motion between source poses is rotational and constructed poses are generated using linear interpolation. Fig. 15 illustrates the potential deficiencies of using simple interpolation to create new poses. The motion of an "angel wing" is illustrated in Fig. 15 showing the movement of an angel's beating wings. Point E is at the tip of the right wing and point B at the tip of the left wing. At E0 and B0, the wings are at the top of their arc (at pose 1) and at Bτ and Eτ, the bottom of their arc (at pose 2). The midpoints of rotation of the wings are at B2 and E2 respectively. In true rotational motion, the wing tips are at minimum x displacement at the top and bottom of the arc and at maximum x displacement at the midpoint. If the animator specifies only the top and bottom wing positions as shown in Fig. 15 as source poses, and the computer generates the constructed poses through linear interpolation, the result is that the wing will appear to shrink as it moves from top to bottom, as shown by the positions of the tips at B2 and E2 (dotted lines). Of course, additional source poses may be specified by the animator at intermediate positions between the extremes of motion of the wing, but the additional poses may be needed for creating other wing motions, for example, a twisting of the wings as they beat up and down.
The segment warp technique of the present invention solves this problem as described with reference to Fig. 16. As shown in Fig. 16(a), using the right wing as an example, match points are specified at points A, B, and C. A warp handle, WH, is then specified at point B, the wing tip. A warp path, WP, shown as the dotted line, is drawn to specify the relative displacement of the warp handle.
The warp path shown is for one downward sweep of the wing from the top of its arc to the bottom. The warp profile is drawn as in Fig. 16(b). The segment warp specified by the warp path and profile graph is then applied in conjunction with the pose transformations of the angel wings, which are specified with a pose transformation graph, as described above. As the wing moves downward, the displacements specified by the warp path are applied to the points along the segments A-B and A-C in accordance with the warp profile shown in Fig. 16(b).
The result is that as the wing moves downward form pose 1 to pose 2 to pose 3, the points along the two segments are displaced so as to maintain the proper size of the wing during the transformation from pose to pose. The wing in effect is progressively stretched outward as it moves down so that the wing tip follows the proper arc, designated Bl, B2, B3 in Fig. 16(c). The action of the angel with the wings moving up and down may be scripted using the previously described transformation graph and velocity profile. This action may then be coordinated to the segment warp of the wing. As previously described, this may be done by drawing the warp path while viewing the transformation of the angel's wings or using sync points to control the velocity profiles so that, for example, the maximum displacement of the warp from the reference point occurs when the wing is at the midpoint of the sweep downward of the wing.
If there are many beats of the wing, as would normally be the case, a single warp path (basically an outward and inward motion) is drawn, continuously, for each down beat and each up beat, and the warps are synchronized to the beats as described above. A similar segment warp would be applied to the left wing as well.
The segment warp concept is a very powerful technique with many applications. For example, complex effects such as waves, wind effects, and acceleration effects may be readily achieved using this technique. Wind effects may be created as illustrated in Fig. 17. Fig. 17(a) illustrates a flag which the animator wants to illustrate as blowing in the wind. Three segments of the flag are to be transformed by the segment warp, labelled SI, S2, and S3 as shown. Match points MPl and MP2 are also shown at the lower corners of the flag. SI is comprised of points 0- MPl, S2 of points MP1-MP2, and S3 of points MP2-3. A waφ handle H is placed at point MP2 for convenience and potential warp path P, represented by the dotted line in Fig. 17(a), is drawn. Fig. 17(b) represents the profile graph for the three line segments. As shown in Fig. 17(b), segment SI varies from zero displacement at the attach point 0 to maximum displacement at MPl. Segment S2 is always at maximum displacement, and segment S3, like segment SI, varies from zero displacement at point 3 to maximum displacement.
Thus far, a normal segment warp has been described. However, for wind effects, the warp path P represents only the potential warp path of the segments. The actual position along the path is determined by specifying a wind vector as shown in Fig. 17(c). This is simply drawn by the animator as if the wand were being blown back and forth by the wind, and recorded by the computer. For purposes of simplifying the description, the wind is shown blowing along the x-axis only. Fig. 17(d) represents the velocity profile for the wind which could be derived from tracking the rate of the back and forth motion of the drawing wand when generating the wind path shown in Fig. 17(c). At maximum positive velocity the maximum positive displacement along the potential warp path is applied and at maximum negative velocity, the maximum negative displacement is applied. In addition, zero displacement is defined to occur at zero velocity. Displacements between zero and the maximum point and zero and the minimum point are produced simply by using the wind velocity at each frame interpolated so that the maximum wind velocity corresponds to maximum displacement. Depending on the direction (positive or negative) and speed of the wind, the segments will be warped as shown in Fig. 17(e) (negative) or 17(f) (positive). The displacement of a particular point of a line segment along the motion path at any given point in time is dictated by the velocity of the wind at that point in time, which could be positive or negative and thus also defines the direction of displacement. The potential warp path must be drawn with reference to the wind direction. Thus, if the wind direction were not along only the x axis as shown in Fig. 17(a), but also along the z axis, a potential warp path would have to be drawn for how segments of the flag would be warped in the z axis. The wind velocity along the z axis would also be determined from the wind vector.
The advantage of this technique over a normal segment warp is that it provides for control of the displacement along a potential warp path as opposed to an actual predetermined warp path. In addition, use of the wind warp permits the same wind vector to be applied to numerous elements in a drawing which will all be similarly affected by the wind. The animator may specify that the wind warp be applied to different objects in a drawing at different times to create the effect of a gust of wind moving through a scene.
Inertial effects are created in a manner similar to wind effects. In this case, however, rather than using the wind velocity to control the displacement along a potential warp path, the acceleration of a main object of motion is used. For example, if a character begins to run, his acceleration will cause his coat to lift up behind him in the opposite direction. A potential warp path for the coat may be drawn, and the position of the appropriate segments of the coat along the potential warp path determined by the change in velocity (acceleration) of the person wearing the coat. Thus, when the character begins to move from a standing position, acceleration is greatest and the coat will fan out behind him to the maximum extent. As the character reaches a steady velocity, however, his acceleration goes to zero and the coat returns to the zero displacement position.
Wave effects may also be created using the segment warp concept. A "wave warp" is a means for creating the effect of a wave travelling through a segment or segments. In the case of a wave effect, a warp handle and warp path are not required. A straight reference line A-B as shown in Fig. 18(a) is drawn. The desired wave motion, shown as dotted line wl-w2, is drawn with reference to this line. The wave W1-W2 need not lie in one plane but may be three-dimensional so as to define, for example, a corkscrew.
The displacements between each point along the wave relative to the line A-B is calculated based on vectors drawn normal to the straight line and intersecting the wave. For each point Pi along the wave, the corresponding displacement Di is calculated. As shown in Fig. 18(b), these relative displacements are then applied to a line segment S of a drawing in order to transfer the effect of the wave to the object or objects in the drawing (only P1-P7, representing the first crest of the wave, are illustrated).
The result of the effect of the initial wave crest on the segment S in the first resulting frame is illustrated in Fig. 18(c). The points along the segment D1-D7 are displaced an amount D1-D7, respectively. The series of displacements D1-D7 defined by the wave of Fig. 18(a) is then shifted along the segment S (depending on the direction of travel of the wave) so that in the next frame of animation, the displacements are applied to different points along the segment S. In the example of Fig. 18, the wave is traveling to the right. As shown in Fig. 18(d), the displacements D1-D7 are shifted two points to the right so that they now are applied to points P3-P9 on the segment S. Thus, the segment in frame 2 appears as shown in Fig. 18(e). The amount of shift is determined by the velocity of travel for the wave, which is specified by the animator. The process is repeated for each successive frame of animation so as to create the appearance of a wave travelling through an object. As in the case of an ordinary segment warp, a warp profile graph is used to modulate the effect of the wave path at each point along the segments affected segment or segments. For example, the warp profile graph may be drawn so that the wave effect may not be evident at all at the beginning of a segment but have an increasing effect as it travels along the segment. For example, the tail of a tadpole moving through the water would have no lateral wave movement at its root, but increasing movement toward the tail.
In one embodiment, the animator specifies four parameters to control the wave effect: i) the velocity of wave travel in terms of the number of points shifted per frame; ii) the direction of wave travel; iii) the starting point of the wave; and iv) the ending point of the wave. The wave path drawn by the animator is then interpolated based on these parameters to obtain the desired effect. For example, if the animator desires that the wave effect start and end on the segment so that it is present for the entire length of the animation, and that the velocity of wave travel is 1 point per frame, the length of the originally drawn wave path is adjusted by interpolation to be twice the length of the segment so that at the beginning of the animation, the entire first half of the wave is applied to the segment. Due to the movement of the wave through the segment during the animation, at the end of the animation, the first half has moved completely through the segment and the second half is entirely on the segment. Similarly, if the velocity is doubled, the wave path must be stretched by interpolation to four times the length. The wave effect may also be specified as starting or ending off of the segment, in which case the length would similarly be adjusted.
Wave warps are a very simple but powerful method for creating motion which appears organic and life-like.
Where the overall orientation of a character or object changes significantly during the course of an animation sequence (e.g., by more than 45° on any axis), simple segment warps may not create the desired effect. For example, in the segment waφing of the tail shown in Fig. 12(b), if the fish were to turn over onto its side during the sequence, the segment warps as shown would move the tail up and down relative to the fish rather than side to side. In this situation, a "constructed segment warp" may be used. For a constructed segment warp, a warp handle is indicated and a source warp path and source warp profile graph are drawn for each source pose of the character or object, with the source warp path appropriately related to the orientation of the object in that pose. Before the warp effect is applied, a constructed warp path and constructed wa profile graph are derived from the source warp paths and source warp profile graphs using weighted averaging in the same manner as for the constructed poses. Similarly, from the velocity profiles of the source warp paths, a constructed velocity profile is derived for the constructed warp path and may be modified as previously explained (the separate warp paths may need to be synchronized as described above so that they stay in sync regardless of the constructed pose). In this manner, the orientation of the constructed warp path is correctly related to the orientation of the object. The constructed warp path then produces the segment warp, as described above for simple segment waφs. For complex drawings using warps, it could be tedious if related warps were required for many segments. However, the concept may be readily extended to more complicated forms using a technique referred to as "spine waφing." Spine warping is used to transform objects comprising multiple line segments with a single warp by applying the waφ to a "spine" of the object. The term spine is used because a straight line is drawn roughly through the centerline of a group of line segments which may, for example, define the body of an animal. A waφ is then applied to the spine and then transferred to the individual drawing segments. For spine warps, a straight line reference spine is drawn in each source pose used in a transformation and the animator selects the segments to be affected by the spine warp. For each segment selected, peφendicular distances from the points along the segment to the reference spine are calculated in order to transfer a warp applied to the spine to the selected segments. Constructed poses are generated in the manner previously described. The constructed poses include the straight line reference spine which is treated as an additional line in a source drawing but not displayed. The spine warp is then applied to the appropriate segments of the constructed poses, using the displacements between the reference spine and the warped spine and the perpendicular distances from the points along the segments to the reference spine.
For example, Fig. 19(a) illustrates a constructed pose of a fish with a straight line spine, S. The spine is drawn by the animator but is not a part of the drawing that is displayed in the resulting animation frames.
The perpendicular distances from points Pl-Pn along the line segments to the spine are calculated and stored in order to transfer warps imposed on the spine to the segments of the drawing. A single warp path P is used in combination with a warp profile graph to warp the spine S. The spine may be warped by any of the above-described warps. Fig. 19(b) illustrates the warped spine S' (intended to be shown bending into the paper). For each line segment controlled by the spine warp, each point along' the segment is displaced using the calculated displacement of the waφed spine relative to the reference spine. In this manner, complex forms may be readily transformed in a simple manner using any of the above warping techniques.
A final aspect of the present invention also relates to creating constructed poses that maintain the proper coloring of source poses to enable the completely automatic painting of a series of animation drawings. In prior art computer painting methods of painting images, closed loops are drawn in two-dimensional space and filled in with color using a "seed" point. This technique is well known in the art of two- dimensional computer drawing and painting systems. The seed point acts as a starting point for the filling of closed loops in the color chosen by the animator. Painting proceeds outward from the point until the boundary of the loop is detected and filling the bounded area. However, the seed fill technique has drawbacks when used for the automatic painting of stereo and two-dimensional images. For example, when the seed fill method is used for small loops, it may be difficult or impossible for the animator to place the seed point within a stereo loop in such a position that when the fill method is applied to the left and right eye two-dimensional projections of the stereo image, the seed point falls within each projected two-dimensional projected loop. The result is that for one or both eye projections, it may happen that the exterior of the loop is filled and not the interior. In addition, where a computer-assisted animation sequence of drawings is being generated and it is desired to automatically paint the series of drawings, the generated drawings may, by design, contain single loops that twist in three- dimensional space, thus creating several apparent loops in the two- dimensional projections of the transformed loop. In this situation, the seed point may fall entirely out of the loops, or only fill one of the two- dimensional loops. For example, a single loop with a seed point SP, shown in Fig. 20(a), may be twisted into a figure 8 when it is projected onto a plane creating two loops on the plane, shown in Fig. 20(b). The seed point SP may then fall within only one of the loops of the figure 8 as shown in Fig. 20(8), in which case only that portion will be filled. Alternatively, the seed point may fall outside the loop entirely, as shown in Fig. 20(c), in which case the area external to the loop will be colored.
The present invention solves this problem using a technique referred to herein as "fill masking." Fill masking is a technique where a painted loop that is part of a stereo image is filled for display purposes by processing the loop prior to display in the following manner. First, the left and right eve projections of the stereo image of the loop on to a two- dimensional plane are ascertained. For each of these projections, in an off¬ screen buffer, a rectangle at least one pixel larger on each side than the projected loop is generated by determining the minimum and maximum x and y coordinates of the loop as shown in Fig. 5(a). Fig. 21(a) illustrates a single eye projection of a loop and rectangle. The entire rectangular area is generated in the color with which the loop is to be filled. The two- dimensional projection of the loop originally drawn by the animator is transferred to the buffer in the proper line color for the loop as shown in Fig. 22(b). A fill of the rectangle is then performed using the seed point and flood fill method discussed above. The seed point is generated just within any corner of the rectangle. For this fill, only the region bounded by the exterior of the loop and the rectangle is filled so that the interior of the loop is not filled and therefore remains in the original loop color as shown in Fig. 22(c). The fill consists of a code that makes this bounded region transparent when displayed so that only the loop remains visible in the proper color. After processing in this manner, which takes only a small fraction of a second, the rectangle is transferred from the buffer to the viewable display. It is known in the art of computer drawing systems to provide a "transparent" or "no-copy" color to indicate that the region filled with this color should not be copied to the screen from the buffer. All that appears is the loop in the proper color and the boundary line for the loop. For stereo loops, the process is repeated for each of the left and right eye projections of the loop.
This technique has been described for three-dimensional drawings but is equally applicable to the automatic painting of sequences of two-dimensional drawings.
The appendix contains the BASIC code for implementing the transformation graphs, space path, segment warps, wind warp, inertia waφ, and wave waφ of the present invention. This code is one example of the code that may be utilized and should not be construed as limiting. Those of ordinary skill in the art of will recognize that other code may be used. The invention has been described in greatest detail with respect to the particular embodiments and exemplary applications described above. However, the invention is not limited by this embodiment and examples, but is limited only by the scope of the appended claims. Appendix
DEFINT A-Z
*********
■ Type Definitions ************'
TYPE andReportType
X AS INTEGER
Y AS INTEGER
Z AS INTEGER
XX AS INTEGER
YY AS INTEGER
ZZ AS INTEGER END TYPE
TYPE t3DPoint
X AS SINGLE
Y AS SINGLE
Z AS SINGLE END TYPE
TYPE SpaceRefPt Locat AS t3DPo t Label AS STRING * 5 Visib AS INTEGER
END TYPE
TYPE LocType X AS INTEGER
Y AS INTEGER Z AS INTEGER
END TYPE
TYPE SterType lx AS INTEGER rx AS INTEGER
Y AS INTEGER END TYPE
TYPE TScriptWayPt Locat AS t3DPoint Label AS STRING * 8
END TYPE
TYPE LineType
Beg AS INTEGER
Fin AS INTEGER
TempFin AS INTEGER FinalStart AS IOTEGER
FinalEnd AS INTEGER chGrp AS INTEGER chObj AS INTEGER
LmeCol AS INTEGER
Looped AS INTEGER
PaintCol AS INTEGER Intermit AS INTEGER KeyForm AS INTEGER Threshold AS SINGLE StartVis AS INTEGER EndVis AS INTEGER Label AS STRING * Nor OrMag AS SINGLE END TYPE
TYPE TempSegType chL e AS INTEGER AStartPt AS INTEGER AEndPt AS INTEGER BStartPt AS INTEGER BEndPt AS INTEGER CStartPt AS INTEGER CEndPt AS INTEGER DStartPt AS INTEGER DEndPt AS INTEGER WchObj AS INTEGER chGrp AS INTEGER chLngst AS INTEGER ADist AS SINGLE BDlst AS SINGLE CDlst AS SINGLE DDist AS SINGLE
END TYPE
Figure imgf000043_0001
WchlnfoArr AS INTEGER
Figure imgf000043_0002
TYPE RefPtType
Frame AS INTEGER TempPtsIndex AS INTEGER Label AS STRING * 15 WchObj AS INTEGER WchGrp AS INTEGER WchWrp AS INTEGER
END TYPE
TYPE TransType
Figure imgf000043_0003
TYPE WarpProfileType
Proportion AS SINGLE END TYPE
TYPE GroupType
WchOb3 AS INTEGER
Label AS STRING * 6
Transshift AS INTEGER
VelHookl AS INTEGER
VelSlavl AS INTEGER
VelHook2 AS INTEGER
VelSlav2 AS INTEGER
HandleVelcroLocat AS t3DPomt END TYPE
TYPE VelcroType
GrpWithHook AS INTEGER
HookPtlndex AS INTEGER
SlaveGrp AS INTEGER
HookXYZVals AS t3DPomt
END TYPE
Figure imgf000044_0001
TYPE Oc ectFmalPositType FinalPositOb^l AS t3DPoιnt FιnalPosιtOb32 AS t3DPo t FιnalPosιtOb33 AS t3DPomt
END TYPE
TYPE SegWarpInfoType
WchSeg AS INTEGER Hndl AS INTEGER ProfBeg AS INTEGER Kind AS STRING * WchPath AS INTEGER WchWave AS INTEGER WchProf AS INTEGER SegLen AS INTEGER WaveSpeed AS INTEGER Direc AS STRING * OverLap AS INTEGER END TYPE
TYPE PaintType
SeedA AS t3DPomt SeedB AS t3DPoint SeedC AS t3DPoιnt SeedD AS t3DPomt PaintCol AS INTEGER Wc Ln AS INTEGER END TYPE
TYPE RegType ax AS INTEGER bx AS INTEGER ex AS INTEGER dx AS INTEGER
BP AS INTEGER
SI AS INTEGER
DI AS INTEGER
FLAGS AS INTEGER
DS AS INTEGER
ES AS INTEGER END TYPE
TYPE TransferType Cmd AS INTEGER Param AS INTEGER X AS SINGLE Y AS SINGLE Z AS SINGLE
END TYPE
TYPE AnchorRunType
Figure imgf000045_0001
'following are constants for Cmd field:
'coπroands that need XYZ:
CONST ePointAt = &H1000 '4096
CONST eLineTo = &H2000 '8192
CONST eFloodFill = &H3000 '12288
'commands that need nothing:
CONST eNop = 0
'coi iands that need Param:
CONST eStartCel = &HA00 '2560
CONST eSetColor = itHlOO '256
CONST ePaletteSize = &HB00 '2816
CONST eSetMix = &H300 '768
CONST eSetLineWidth = &H400 '1024
CONST eAddBorderColor = &H500 '1280 CONST eDeleteBorderColor = &H600 '1536 CONST eClearBorderColors = S-H700 ' 1792 CONST eStartEntity = &HC00 '3072
• bit masks for Param for eStartEntity
CONST eFilled = S-Hl CONST eNonFilled = 0 CONST eLooped = &H2 CONST eNonLooped = 0
********
' General Enumerations ******'
CONST False = 0 CONST True = -1
CONST eScanTransOnTempGraph = CONST eObjPathOnTerπpPts = 3 CONST eOb3PathByFrms = 4 CONST eScanForWarpByFrms = 5 CONST eScanTransByFrms = 6 CONST eScanGrpTransPlusPath = CONST eScanForObjPa hSyncPt = CONST eScanForTransSyncPt = 9 CONST eScanForWarpSyncPt = 10 CONST eScanForReferenceOb^ect 11 CONST eScanForAnchorPts = 12
CONST eObjPath = 13 CONST eTScπpt = 14 CONST eWarpPath = 15 CONST eWaveShape = 16 CONST eW dPath = 17
' External Subroutine Declarations ********** * **
' Initialize, Read and Close 3D Pointing Device DECLARE SUB InitWand
DECLARE SUB ReadWand (SEG Location AS WandReportType) DECLARE SUB CloseWand
' Record Image on Screen for Local Playback DECLARE SUB Snapshot (BYVAL NameCode, BYVAL FrameNo)
' EMS Memory Functions
DECLARE SUB EMSInit (BYVAL PagesReq, SEG Result)
DECLARE SUB PagesAvail (SEG Count, SEG Result)
DECLARE SUB GetArray (BYVAL PageNo, BYVAL Index, SEG Value)
DECLARE SUB SetArray (BYVAL PageNo, BYVAL Index, BYVAL Value)
DECLARE SUB GetArrayReal (BYVAL PageNo, BYVAL Index, SEG Value AS SINGLE)
DECLARE SUB SetArrayReal (BYVAL PageNo, BYVAL Index, BYVAL Value AS SINGLE)
DECLARE SUB EMSClose
EMS memory page assignments ***********************
Normal EMS page allocations - change TWEENY.C if more than 80 needed CONST RawPtsXPg = 0 CONST RawPtsYPg = 1 CONST RawPtsZPg = 2
CONST TempPtsXPg = 3 CONST Te pPtsYPg = 4 CONST TertpPtsZPg = 5
CONST JAPtsXPg = 6 CONST JAPtsYPg = 7 CONST JAPtsZPg = 8
CONST BPtsXPg = 9 CONST JBPtsYPg = 10 CONST BPtsZPg = 11
CONST JCPtsXPg = 12 CONST JCPtsYPg = 13 CONST JCPtsZPg = 14
CONST DPtsXPg = 15 CONST JDPtsYPg = 16 CONST JDPtsZPg = 17
CONST TempPts2XPg = 18 CONST TempPts2YPg = 19 CONST TempPts ZPg = 20
CONST PathlXPg = 21 CONST PathlYPg = 22 CONST PathlZPg = 23
CONST Path2XPg = 24 CONST Path2YPg = 25 CONST Path2ZPg = 26
CONST Path3XPg = 27 CONST Path3YPg = 28 CONST Path3ZPg = 29
CONST Pa h4XPg = 30 CONST P th4YPg = 31 CONST Pa h4ZPg = 32
CONST P thδXPg = 33 CONST P h5YPg = 34 CONST Path5ZPg = 35
CONST PathδXPg = 36 CONST PathδYPg = 37 CONST Pa hδZPg = 38
CONST Path7XPg = 39 CONST Path7YPg = 40 CONST Path7ZPg = 41
CONST PathβXPg = 42 CONST Path8YPg = 43 CONST PathδZPg = 44 CONST WaveShapelXPg = 45 CONST WaveShapelYPg = 46 CONST WaveShapelZPg = 47
' Interlaced buffer pages : change TWEENY.C if more than 32 needed
CONST APtsXPg = 256 + 0 CONST APtsYPg = 256 + 1 CONST APtsZPg = 256 + 2
Figure imgf000048_0001
CONST DPtsXPg = 256 + 9 CONST DPtsYPg = 256 + 10 CONST DPtsZPg = 256 + 11
CONST FastWorkArraylXPg = CONST Fas WorkArraylYPg = CONST FastWorkArraylZPg = CONST FastWorkArray2XPg = CONST FastWorkArray2YPg = CONST FastWorkArray2ZPg =
CONST TeπpSmoothPtsXPg CONST TempSmoothPtsYPg = CONST TempSmoothPtsZPg =
Figure imgf000048_0002
CONST EMSPagesRequired = 82 * 8 '50 normal pages + 32 interlaced pages
' Global Data Variables ************************************************ DIM SHARED gBuildToggle
DECLARE SUB ReCntrGrp (WchGrp%, PtArray%, CenterOfGrp( ) AS ANY)
DECLARE SUB Mr GrpCntr (Message$, Pose%, WchGrp%)
DECLARE SUB ShowGrp (WchPose%, WchGrp%, ShowColor%)
DECLARE FUNCTIC:: DistBet2Pts! (aArrayl%, aArray2%, aPointIndexl%, aPointIndex2%) DECLARE SUB ShcwFinalLn (WchPose%, LnNo%, ShowColor%) DECLARE SUB SwapLineDirection () DECLARE SUB Shov,<3uideMatchPts (WchPose%) DECLARE SUB MarkSpaceRefPts () DECLARE SUB ShcwSpaceRefPts () DECLARE SUB Ad-P thAlongXYZ (WchPath%) DECLARE SUB Pat Adj 0 DECLARE SUB Ad30b3PathStartEnd (Array%, NoOfArrayPts%)
DECLARE SUB VisInvisOb} 0
DECLARE SUB ChooseGrp (ChosenGrp%, GrpTextS)
DECLARE SUB ChooseOb3 (ChosenOb3%, Ob3Text$)
DECLARE SUB MrkVisInvisLme 0
DECLARE FUNCTION CalcDlStBetPts' (Ptl AS ANY, Pt2 AS ANY)
DECLARE FUNCTION FιndAlnForIntermιt% (WchPt%)
DECLARE SUB MrklntermtL e 0
DECLARE FUNCTION CalcTDist1 (Vertex)
DECLARE FUNCTION CalcTetFrms% 0
DECLARE FUNCTION LnEndsClose (PtArray, IndexPtA, IndexPtB, Range)
DECLARE FUNCTION F dAln (aMatchPt, aPointNdx)
DECLARE FUNCTION CalcTProps (WchFrame)
DECLARE FUNCTION XYZDlff ()
DECLARE FUNCTION WarpSegProfPtr' (WchProf, WherelnProf)
DECLARE FUNCTION F dWchFinlSg (Array!) AS ANY, PointNdx)
DECLARE SUB PathShiftToMatchPrevRun (WchOb:%)
DECLARE SUB ShowAllFnlSegs (WchPose%)
DECLARE SUB AllPosesAreA ()
DECLARE SUB ScanPoseTrans (ForWhat%, WchGrp%, WchObjPath%, FrameNo%)
DECLARE SUB Velcro ()
DECLARE SUB TrnsfrPrevLnToTempPts (Array%, Start%, Fιnιsh%, WchSource%, DestιnatιonPose%)
DECLARE SUB TrnsfrPrevLineToIm (WchSource%, DestιnatιonPose%, WchLιne%)
DECLARE SUB ShowGrpTransInPathPosit (WchObu, WchGrp, Grp2, Index)
DECLARE SUB ShowOb OnPath (WchObj, Ob32, ObjPathPosit AS t3DPomt)
DECLARE SUB MrkObjAnchorPt ()
DECLARE SUB PlaceSyncPtsOnTerπpPath (Kind, WhιchOne%, PathText$)
DECLARE SUB ShowGroupTScript (WchGrp, Group2, Scanlndex, IndexType$)
DECLARE SUB ChooseL eColor 0
DECLARE SUB ShowSyncPtLines (StartO PresentSyncPts)
DECLARE SUB S apSortedSyncPts ()
DECLARE SUB FιndFrmInChartOb3GrpWarp (Kind, WchOne, WchFrame)
DECLARE SUB ShowASegStart (WchSeg)
DECLARE SUB WndPtScan (Object, Object2, Group Group2, Array, Limit MarkType, ScanForWhat)
DECLARE SUB DrawAPose 0
DECLARE SUB SetUpGlueLoops () DECLARE SUB DefnGrpsOb^s 0 DECLARE SUB MkScaffold 0 DECLARE SUB DrawBCDPoses () DECLARE SUB F dLngstSeg 0 DECLARE SUB MtchPtsPartO 0
DECLARE SUB MkFrameScreenV4 (Kmd%, WchOne%) DECLARE SUB MrkScaffoldPts () DECLARE SUB Sho Scaffold (WchPose)
DECLARE SUB MrkScaffoldCntr (Messages, WchOb}, WchPose) DECLARE SUB VerticalText (Text$, y, x) DECLARE SUB Na eWarps 0
DECLARE SUB SortSyncPtsForApplic (Kind, WchNo) DECLARE SUB PlaceSyncPtsOnFrmChrt (Kind, WchOne, Text$) DECLARE SUB ScanForπfTrans (ForWhat, WchGrp, WchOb3Path, FrameNo) DECLARE SUB Pa tLoop 0 DECLARE SUB D3Wave (RequiredLengthOf ave) DECLARE SUB TrnsfrWave (WaveNo) DECLARE SUB MyDelay (HowLong)
DECLARE SUB WarpSegWaveShapePtr (PositionNo, WchWaveShape, WarpSegWaveShaDePtPosit AS ANY) DECLARE SUB ShowFnlSegs (WchArray, WchLme, ShowColor)
DECLARE SUB MkPathCycle 0
DECLARE SUB DefnPt (DefndPoint AS t3DPoιnt, Messages, PtIsForS- WchMrkr)
DECLARE SUB PlaceFπrChrtSyncPtsOnPath (Kind, WchNo)
DECLARE SUB Colorlt ()
DECLARE SUB PutDrwMnuOnScrn (TextS, WchPose, Version)
DECLARE SUB S oothJoin (PtsToBe oined, Range)
DECLARE SUB TmsfrATo (Array, ImageLns() AS ANY)
DECLARE SUB NameOb^ects 0
DECLARE SUB NameGroups ()
DECLARE SUB SbtrcArr (Result, Whole, PartO AS ANY, I, J, K)
DECLARE SUB ShowOb^ectSegs (WchOb:, WchPose, aColor, aUseLines)
DECLARE SUB MtchPtsPartl 0
DECLARE SUB FindlnRng (PtArray, Start, Finish, Range)
DECLARE SUB Getl FxXYZ (UrfToFix, PtPosit)
DECLARE SUB Ad3MtchPt (WchPose, WchLine, MtchPtNdx)
DECLARE SUB FmdDesPt (WchPose, WchLine)
DECLARE SUB MtchPtsPart2 (WchPose, MtchPtNdx)
DECLARE SUB MtchPtsPart3 (WchPose, MtchPtNdx)
DECLARE SUB JstfyTempSegsPartB (WchSeg, LngstSeg SegStart, SegEnd)
DECLARE SUB MkTetLns (Vertex, OtherVertex)
DECLARE SUB SetupTetra ()
DECLARE SUB CalTetFrms 0
DECLARE SUB Tetra (WchGrp)
DECLARE SUB DelLast (WchPose)
DECLARE SUB DelLast.B (LnArrayO AS ANY, WchPose)
DECLARE SUB GetXYZ (WchPt)
DECLARE SUB TrnsfrltnpToImPartB (PtArray)
DECLARE SUB ShowGuιdeLnPart2 (LnArrayO AS ANY, PtArray, WchPose)
DECLARE SUB DelLastLnPart2 (LnArrayO AS ANY, PtArray, WchPose)
DECLARE SUB ShortCutOb3ects 0
DECLARE SUB Pu lnObj (WchGrp, WchObj)
DECLARE SUB PutlnGrp (WchLine, WchGrp)
DECLARE SUB ShortCutGroups ()
DECLARE SUB NoMtchPtS 0
DECLARE SUB CalcFlatXY O
DECLARE SUB ShowFlatCrsr 0
DECLARE SUB ClearMtchPts ()
DECLARE SUB HlLiFinlSg (SegNo)
DECLARE SUB ShowGuideLn (WchPose)
DECLARE SUB CalcMrkrPts ()
DECLARE SUB CalcLXRXY 0
DECLARE SUB TrnsfrWhlArray (Arrayl, Array2)
DECLARE SUB WndMnu (TextS, AS, B$, C$, D$, E$)
DECLARE SUB WndSlct (AnsS, Delay)
DECLARE SUB WndChs (TextS, A$, B$, C$, D$, ES, Ans$, When)
DECLARE SUB Wndln O
DECLARE SUB Smooth (Arrayl, Array , SmoothRange, EvenSpacmg)
DECLARE SUB ShowObnPath (Array, Visibility)
DECLARE SUB MkPathGrfs (Spacer)
DECLARE SUB Construct (BegmFrame, FmishFrame, NoOfOb3ectsForThιsRun)
DECLARE SUB GetSu WarpDisp (SeglnfoLstO , SeglnfoLstNdx, Fra eNo,
SegNo, SegPtNo, SumWarpDisp AS ANY) DECLARE SUB WarpSegPathArrayPositPtr (FrameNo, WchPath,
WarpSegPathPtPosit AS ANY) DECLARE SUB PathArrayPositPtr (FrameNo, WchPath, Ob3PathPos AS ANY) DECLARE SUB TransPtr (FrameNo, WchGrp, AllProp AS TransType) DECLARE SUB Interpo (Array, StartOfGap, EndOfGap)
DECLARE SUB Stretch (Small, Big, StartSmall, EndSmall, StartBig, EndBig) DECLARE SUB ShowAllSegStarts O DECLARE SUB GetWarpProflie (WarpNo) DECLARE SUB FindMrkdPtlnAPose (ThisOne, TextS) DECLARE SUB MkUmPath (TextS, MkUniPathFor) DECLARE SUB FindlnApts (FoundPt) DECLARE SUB JstfyTempSegsPartA 0 DECLARE SUB GetWndXYZ (Kind) DECLARE SUB MkSegs 0
DECLARE SUB DefnSegWarp (WrpNumber, AvlPth, AvlWarpProflArray) DECLARE SUB ShowFlatPt (x, y, C)
DECLARE SUB TmsfrProp (Array0 AS ANY, NoOfVals%) DECLARE SUB TrnsfrWarp (Array0 AS ANY, NoOfVals%) DECLARE SUB TrnsfrPath (aSourceArray, PathNo) DECLARE SUB ShowObj (WchOb3ect, WchPose) DECLARE SUB DefnObnCntrs 0
DECLARE SUB ShowWhllmage (WchPose, ShowColor)
DECLARE SUB ReCntrOb (WchObj, PtArray, CenterOfOb3 AS t3DPoιnt) DECLARE SUB MrkObjCntr (Messages, WchPose, WchOb3) DECLARE SUB HiLiLn (LnArrayO AS ANY, PtArray, LnNo) DECLARE SUB IdentObjects 0 DECLARE SUB I entGroups 0 DECLARE SUB GetPts (PtArray, PtArrayNdx) DECLARE SUB ErsMnu 0
DECLARE SUB GetStartFinish (LnLst AS LineType, LnNo, Start, Finish) DECLARE SUB TrnsfrTmpToI PartA (WchPose) DECLARE SUB ShowLn (WchPose, LnNo, ShowColor) DECLARE SUB LdLnLnArrays (WchPose, Col) DECLARE SUB DrawABCDIm () DECLARE SUB EnterRawPt (Ptlndex)
DECLARE SUB LdLnLst (Array0 AS LineType, WchPose, Col) DECLARE SUB Mrk (Kind, FlatStereo) DECLARE SUB ShowCrsr 0 DECLARE SUB Drawlmg (WchPose) DECLARE SUB CrsrOn 0 DECLARE SUB MkMrkrs ()
DECLARE SUB OldSmooth (RuffPtsO AS t3DPoιnt, SmoothPtsO AS t3DPomt, SmoothRange)
. ••**••*****.**************..*****•* General Utility Routines
DECLARE FUNCTION Confιrm% (aQuestionS)
DECLARE FUNCTION UserChoιce% (TextS, AS, B$, CS, D$, E$)
DECLARE SUB WaitForClick ()
DECLARE FUNCTION Limits1 (x1, L1 , H1 )
DECLARE FUNCTION GetA% (PageNo%, Index%)
DECLARE FUNCTION GetAReal' (PageNo%, Index%)
DECLARE SUB SetA (PageNo%, Index%, Value%)
■ A*********************************** Velocity Graph Routines
DECLARE SUB DoVelocityGraph (aDrawnPath, aFramePosArray, TextS)
DECLARE SUB Dra VelGraph (aDrawnPath, aFramePosArray)
DECLARE SUB GetVelGraphFromPath (aDrawnPath)
DECLARE SUB GetVelGraphFromUser (aDrawnPath)
DECLARE SUB CalcFramePositions (aDrawnPath%, aFramePosArray%)
DECLARE FUNCTION DistToNextPomt' (aArray%, aPoιntIndex%)
. *******•*•••***********••*****••* interface with Sandde 6 DECLARE SUB WrlteXFerInfo <C%, P%, x', y', Z1) . •••**••**•••••»**•*****•»*•******•** Low-level Drawing Routines DECLARE SUB Draw3DPomt (aPo t AS t3DPomt, aColor AS INTEGER) DECLARE SUB Draw3DLιne (aPointl AS t3DPoιnt, aPo t2 AS t3DPoιnt aColor AS INTEGER) DECLARE SUB DrawArray (aArray%, aColor%, aUseLιnes%) DECLARE SUB DrawPartialArray (aArray%, aStart%, aFιnιsh%, aColor%, aUseLιnes%)
COMMON SHARED LastLX, LastRX, LastY, LnNo, lastl rkx, lastrmrkx, las mrky COMMON SHARED FrstLn, GroupsDefnd, NoOfLines, NoOfGroups COMMON SHARED Ob3ectsDefnd, NoOfOb3ects, NoOfSortedSyncPts, ImOK COMMON SHARED NoOfFrames, Interval1, Operation, TransOK, WchGrp,
MtchPtsOK COMMON SHARED NoOfMtchPts, NoOfSegs, NoInSrs, TotalSegsLen, WarpNo,
AvllnfArr COMMON SHARED TransGrfValsOK, AS, BS, CS, D$, E$, Ans$, UsesPrevPath,
Delay COMMON SHARED Foundlt, ThisOne, Wx, Wy, Wz, OneFrameOnly, PtPosit,
GrfValsOK COMMON SHARED AllMtchPtsOK, OneSetChosen, WchLine, Ob;jectsNamed COMMON SHARED MkLineLoopS, LinesToDraw, LineColor, GroupsNamed,
Ad ustTestFrame COMMON SHARED WaveLen, WaveWarp, WaveNo, Xcenter, Ycenter, PathError COMMON SHARED Range, LeftBound, Topbound, RightBound, BottomBound,
NoOfVelcros COMMON SHARED Magnified, SyncPtlndex, WarpsNamedOK, NoOfWarps COMMON SHARED NoOfScaffoldPts, GlueLoopsYN, SegsOK, SumSegLen, RepeatA COMMON SHARED FmdLngstSegOK, JustifiedOK, WarpsOK, ObjCntrsOK,
WaveSpeed COMMON SHARED DrawAPoseOK, DrawBPoseOK, DrawCPoseOK, DrawDPoseOK,
WchPoseForHi11 COMMON SHARED AvlPthOnEntryToWarp, ChoicelnSegHili, WchSeg, SaveThisRun COMMON SHARED ZPlane, Spacer, NoOfPathRefPts, ZFixed COMMON SHARED WchObj, FrameNo, NoOfColors, Scaffold, SaveNameS,
DoneMtchPts COMMON SHARED WaveRefStart AS t3DPomt, WaveRefEnd AS t3DPoιnt,
AbortMatchPt COMMON SHARED DeleteAllButPreviousI age, AllPosesSameAsA, NoOfAncRuns COMMON SHARED LmkingToPreviousRun, EndFrameOfPrevRun, RunNameS,
ColoredOK COMMON SHARED PathMaster, Copycat, DuplicatePath, GlueLoops, Zoom!,
ReUsmgPoseAOnly COMMON SHARED WchPoseForMag, Normallm, MagLmesToDraw, ReferenceFrame,
UsingRefOb]ect 'SDYNAMIC
DIM SHARED SpaceRef(10) AS SpaceRefPt
DIM SHARED FoundPt AS t3DPoιnt
DIM SHARED InRegs AS RegType, OutRegs AS RegType
DIM SHARED XYZ AS t3DPoιnt
DIM SHARED LXRXY AS SterType, LastLXRXY AS SterType DIM SHARED MrkrPts AS SterType, LastMrkrPts AS SterType DIM SHARED LCrsr(9, 9) DIM SHARED RCrsr(9, 9)
DIM SHARED CmrkL(9, 9)
DIM SHARED CmrkR(9, 9)
DIM SHARED SqmrkLO, 9)
DIM SHARED SqmrkRO, 9)
DIM SHARED TrrnrkL<9, 9)
DIM SHARED TrmrkRO, 9)
DIM SHARED CrossMrkL(9, 9)
DIM SHARED CrossMrkRO, 9)
DIM SHARED TransferPt AS t3DPoint
DIM SHARED LιneLength(4, 75, 0)
DIM SHARED ALnPlace(50, 1)
DIM SHARED OtherLnPlace(50, 1)
DIM SHARED PtsToBeJomed(30)
DIM SHARED AncRun(lO) AS AnchorRunType
DIM SHARED XLeverage AS SINGLE DIM SHARED YLeverage AS SINGLE DIM SHARED ZLeverage AS SINGLE DIM SHARED XAd3USt AS SINGLE DIM SHARED YAd3ust AS SINGLE DIM SHARED ZAd3USt AS SINGLE
DIM MagCenter AS t3DPoιnt DIM ScreenCenter AS t3DPoιnt DIM MagDiff AS t3DPoint
EMSInit EMSPagesRequired, Result IF Result <> 0 THEN
PRINT "Unable to allocate EMS memory, Error Code : "; HEXS(Result)
STOP ENDIF
Star Agam: RESTORE
REDIM SHARED TPts(8) AS t3DPomt TPts(l) .x = 105 TPts(2) .x = 276 TPts(3) .x = 455 TPts(4) .x = 280
TPts(l) .y = 341 TPts(2) .y = 36 TPts(3).y = 338 TPts(4) .y = 188
TPts(l) .Z = -51
TPts(2) .Z = -51
TPts(3) .Z = -51
TPts(4) .Z = 253
REDIM SHARED MBXVals(lO)
DATA 12, 98, 140, 226, 268, 354, 396, 482, 524, 610
'this is Wnd menu data
FOR I = 1 TO 10
READ MBXVals(I) 'menuboxxvals NEXT
LeftBound = 5: Topbound = 5: RightBound = 634: BottomBound = 344 NoOfColors = 1
CONST LCol = 4: CONST RCol = 9:
CONST ZDivisor = 18
SCREEN 9 COLOR 5 MkMrkrs
InitWand
OUT 888 , 128 + 16 + 8 + 4 + 2
'Provide power for various things : 128 : Drawing switch 64 - used for oscilliscope debugging 32 - used for oscilliscope debugging 16 - used for IR transmitter power 8 - used for IR transmitter power 4 - used for IR transmitter power 2 - used for IR transmitter power 1 - Unused CrsrOn
XLeverage = 10 YLeverage = 10 ZLeverage = 5
XAduust = 150 YAd3ust = 100 ZAdjust = -500 'minus moves cursor away from viewer
KEY(l) ON
ON KEY(l) GOSUB ReduceXYZLeverage
KEY(2) ON
ON KEY(2) GOSUB IncreaseXYZLeverage
KE (3) ON
ON KEY(3) GOSUB NormalXYZLeverage
KEY(5) ON
ON KEY(5) GOSUB MagnifyDrawImg
KEY(7) ON
ON KEY(7) GOSUB NormalDrawImg
KEY(8) ON
ON KEY(8) GOSUB ZShiftNormal
KEY(ll) ON
ON KEY(11) GOSUB ShlftUp
KEY(12) ON
ON KEY ( 12 ) GOSUB ShiftLeft
KEY U3 ) ON
ON KEY(13) GOSUB ShlftRight
KEY(14) ON ON KEY(14) GOSUB ShiftDown
KEY(30) ON
ON KEY(30) GOSUB ZCloser
KEY(31) ON
ON KEY(31) GOSUB ZFarther
KEY(l) ON
ON KEY(10) GOSUB ZShiftNormal
ReUsingPoseAOnly = False ReUsingPoses = False SavingPoses = False Normallm = True
DeleteAllButPreviousImage = True Operation = 0
DO
EnterLoop:
SELECT CASE Operation CASE 0
SetArrayReal APtsXPg, 0, 0 SetArrayReal BPtsXPg, 0, 0 SetArrayReal CPtsXPg, 0, 0 SetArrayReal DPtsXPg, 0, 0 SetArrayReal RawPtsXPg, 0, 0 SetArrayReal TempPtsXPg, 0, 0
SetArrayReal APtsYPg, 0, 0 SetArrayReal BPtsYPg, 0, 0 SetArrayReal CPtsYPg, 0, 0 SetArrayReal DPtsYPg, 0, 0 SetArrayReal RawPtsYPg, 0, 0 SetArrayReal TempPtsYPg, 0, 0
SetArrayReal APtsZPg, 0, 0 SetArrayReal BPtsZPg, 0, 0 SetArrayReal CPtsZPg, 0, 0 SetArrayReal DPtsZPg, 0, 0 SetArrayReal RawPtsZPg, 0, 0 SetArrayReal TempPtsZPg, 0, 0
SetA APtsXPg, 0, 0
SetA BPtsXPg, 0, 0
SetA CPtsXPg, 0, 0
SetA DPtsXPg, 0, 0
REDIM SHARED ALns(75) AS LineType REDIM SHARED BLns(75) AS LineType REDIM SHARED CLns(75) AS LineType REDIM SHARED DLns(75) AS LineType REDIM SHARED Group(5) AS GroupType REDIM SHARED Object(3) AS Ob ectType REDIM SHARED AObjCntr(3) AS t3DPoint REDIM SHARED AGrpCntr(5) AS t3DPoint REDIM SHARED MtchPts(50, 7) REDIM SHARED TempSegs(105) AS TempSegType REDIM SHARED Ob3FmalPosιtιons(5) AS Ob3ectFinalPosιtType DIM SHARED TransferInfo AS TransferType
ON ERROR GOTO ErrorHandler NoFiles = False: SaveThisRun = False LinkingToPreviousRun = False Na eOK = False UsingRecordedPoses = False ReUsingPreviousPoses = False
SELECT CASE UserChoice("3D Or FLAT?" , "" , "3D", "", "Flat" , "") CASE 2
ZFixed = False CASE 4
ZFixed = True END SELECT CLS
IF Confirm("Link To Previous Run?") THEN LinkingToPreviousRun = True
PrevLinkOK = False WHILE NOT PrevL kOK CLS
FILES "k:\Projects\Imax\Tweeny\Paul\ tws" PRINT "Listed Above Are The Records Of The LAST
(CONSTRUCTED) POSE Of Previous Runs" IF NoFiles = True THEN PRINT "No Files" LinkingToPreviousRun = False ELSE
INPUT "Name Of Run To Be ADDED To (Do NOT Include .TWS in Name)"; NameOfPreviousLmkS CLS OPEN "k:\Pro3ects\Imax\Tweeny\Paul\' + NameOfPreviousLmkS
+ ".tws" FOR BINARY AS #1 GET #1, , NoOfPts SetA APtsXPg, 0, NoOfPts
FOR I = 1 TO NoOfPts
GET #1, , SXVal!: SetArrayReal APtsXPg, I, SXVal!
GET #1, , SYVal': SetArrayReal APtsYPg, I, SYVal!
GET #1, , SZVal1: SetArrayReal APtsZPg, I, SZVal' NEXT
DrawPartialArray APtsXPg, 1, GetA(APtsXPg, 0), -1, False PRINT "End Pose(s) Of "; NameOfPreviousL kS; ":" PrevLinkOK = False
IF Confirm*"End Pose(s) Of Correct Previous Link''") THEN PrevLinkOK = True WHILE NOT NameOK
PRINT "Previous Link: ",- UCASES(NameOfPreviousLmkS) INPUT "Name For This Link (Same As Previous, But With
Incremented Link No) "; RunNameS IF Confirm)"Is " + UCASES(RunNameS) + " Correct Name For Link You Are About To Make"5") THEN NameOK = True PoseSaveS = RunNameS END IF WEND ELSE
CLOSE #1
SetArrayReal APtsXPg, 0, 0 SetA APtsXPg, 0, 0 END IF END IF WEND
IF LinkingToPreviousRun = True THEN CLS PRINT "Retrieving Constructed End Pose(s) Of
UCASES(NameOfPreviousLmkS) PRINT
PRINT "Match Points Of Previous Link Were Not Saved" SLEEP 2
GET #1, , NoOfLines FOR I = 1 TO NoOfL es
GET #1, , ALns(I) NEXT ALns(O) .Beg = NoOfLines
GET #1, , NoOfGroups FOR I = 1 TO NoOfGroups
GET #1, , Group(I) NEXT
GET #1, , NoOfObjects FOR I = 1 TO NoOfObjects
GET #1, , Object(I) NEXT
FOR I = 1 TO NoOfObjects
GET #1, , AOb Cntr(I) NEXT FOR I = 1 TO 5
GET #1, , ObjFinalPositions(I) NEXT
GET #1, , EndFrameOfPrevRun CLOSE #1 FOR I = 1 TO NoOfLmes
ALns(I) .Intermit = False
ALns(I) .KeyForm = 0
ALns(I) .Threshold = 0 NEXT END IF END IF
FOR I = 1 TO NoOfLmes 'in case using prev poses
IF ALns( ) .Looped = 1 THEN GlueLoopε = True NEXT
IF LinkingToPreviousRun = False THEN
SELECT CASE UserChoice("This Run For Experiment/Practise OR To Keep'", "", "Expr/Prac", "To Keep", "", "") CASE 2
RunNameS = "Exprimnt" CASE 3
WHILE NOT NameOK
INPUT "Name For This Run (8 characters including link no if any) " ; RunNameS PrevFileTestS = "k:\Projects\Imax\Tweeny\Paul\" +
LEFTS(RunNameS, 2) + "*.TWS" FILES PrevFileTestS
IF NoFiles = True THEN
NameOK = True ELSE
PRINT "Name Not Allowed; First Two Letters Duplicate
Existing Filets) Shown"
IF Confirm("Override'") THEN NameOK = True END IF
WEND END SELECT
PoseSaveS = UCASES(RunNameS) IF Confirm!"Use A Previously Recorded Set Of Source Poses'") THEN
CLS
FILES "k:\Projects\Imax\Tweeny\Paul\* .POS"
PRINT "Listed Above Are The Previously Recorded Sets Of Poses
INPUT "Use Which Set (Do Not Enter .POS)"; OldPoseRetrieve≤
IF OldPoseRetrieveS = "ex" OR OldPoseRetrieveS = "Ex" THEN OldPoseRetπeveS = "Expri nt"
UsingRecordedPoses = True
ReUsingPreviousPoses = True
ReUsingPoses = True ELSE
ReUsingPreviousPoses = False END IF
END IF
SaveThisRun = True
CLS
Operation = 1
CASE 1 'run length
IF LinkingToPreviousRun = False THEN CLS IF ReUsingPoses = True THEN CLS NoOfFra esOK = False
WHILE NoOfFramesOK = False
LOCATE 2, 1. INPUT "Length Of Run In Frames (Playback is at
24 fps)", NoOfFrames Interval1 = 570 / (NoOfFrames - 1)
IF NoOfFrames > 0 THQI
LOCATE 3, 1: PRINT "Run Will Be"; NoOfFrames;
"Frames Long —Is That Correct'"
IF Confirm*"") THEN NoOfFramesOK = True ELSE
PRINT "You Must Enter The No Of Frames Wanted" SLEEP 1 END IF
FOR I = 1 TO NoOfObjects
Object(I) .StartVis = 1
Object(I) .EndVis = NoOfFrames NEXT CLS WEND
IF UsingRecordedPoses = True THEN Normallm = True
IF ReUsingPreviousPoses = True THEN GetPoseS = OldPoseRetrieveS PRINT "Retrieving Source Poses Of ", UCASES(GetPoseS) PRINT PRINT "Reminder Match Points (If Any) Of These Source Poses
Were Saved" SLEEP 4
OPEN "k:\Projects\lmax\Tweeny\Paul\" + GetPoseS + " POS" FOR BINARY AS #3
GET #3, , NoOfAPts GET #3, , NoOfBPts GET #3, , NoOfCPts GET #3, , NoOfDPts SetA APtsXPg, 0, NoOfAPts SetA BPtsXPg, 0, NoOfBPts SetA CPtsXPg, 0, NoOfCPts SetA DPtsXPg, 0, NoOfDPts FOR I = 1 TO NoOfAPts
Figure imgf000059_0001
Figure imgf000060_0001
FOR I = 1 TO NoOfLmes 'in case using prev poses
IF ALns{I) .Looped = 1 THEN GlueLoops = True NEXT
DefnGrpsOb sOK = False
GroupsDefnd = False: GroupsNamed = False: ObjectsDefnd = False
ColoredOK = False
ObjCntrsOK = False
SegsOK = False
Operation = 4 ' (grps/objs) ELSE
Operation = 2 END IF
CASE 2 'glue loops yesno WHILE SetUpGlueLoopsOK = False
SetUpGlueLoops
SetUpGlueLoopsOK = True
DrawAPoseOK = False WEND Operation = 3
CASE 3 'drawAPose
WHILE DrawAPoseOK = False
IF LinkingToPreviousRun = False AND UsingRecordedPoses = False THEN Draw glmage = True SetA APtsXPg, 0, 0 SetA BPtsXPg, 0, 0 SetA CPtsXPg, 0, 0 SetA DPtsXPg, 0, 0 SetA RawPtsXPg, 0, 0 SetA TempPtsXPg, 0, 0 DeleteAllButPreviousImage = True Normallm = True DrawAPose IF NOT Normallm THEN GOSUB NormalDrawImg
ELSE
FOR I = 1 TO NoOfLines
DrawPartialArray APtsXPg, ALns(I) -Beg, ALns(I) .Fin, -1, True
NEXT END IF
DeleteAllButPreviousImage = True DrawAPoseOK = True MkScaffoldOK = False DrawBCDPosesOK = False DrawBPoseOK = False DrawCPoseOK = False DrawDPoseOK = False DefnGrpsObjsOK = False GroupsDefnd = False: GroupsNamed = False ObjectsDefnd = False
ColoredOK = False
ObjCntrsOK = False
SegsOK = False WEND Operation = 4
CASE 4 'defn grps objs
IF ReUsingPoses = True OR LinkingToPreviousRun = True THEN
IF Confιrm("Redo Groups And Objects Assignments Made In Previous Source Poses Or Link'") THEN
DefnGrpsObjsOK = False: GroupsDefnd = False GroupsNamed = False: ObjectsDefnd = False ObjectsNamed = False NoOfGroups = 0: NoOfObjects = 0 ELSE
DefnGrpsObjsOK = True: GroupsDefnd = True
GroupsNamed = True: ObjectsDefnd = True: ObjectsNamed = True END IF ELSE
DefnGrpsObjsOK = False END IF
WHILE DefnGrpsObjsOK = False CLS
GroupsDefnd = False GroupsNamed = False ObjectsDefnd = False: ObjectsNamed = False NoOfGroups = 0: NoOfObjects = 0 DefnGrpsObjs IF NoOfLmes > 1 THEN FOR I = 1 TO NoOfGroups CLS FOR J = 1 TO NoOfLmes
IF ALns(J) .WchGrp = I THEN ShowLn 1, J, -1 NEXT
TextS = "These Lines Make Up Group " + Group(I) .Label + "'" DefnGrpsObjsOK = Confirm(TextS) NEXT
IF DefnGrpsObjsOK THEN FOR I = 1 TO NoOfObjects CLS FOR J = 1 TO NoOfLmes
IF ALns(J) .WchObj = I THEN ShowLn 1, J, -1 NEXT
TextS = "These Lines Make Up Object " + Object(I) .Label + "'" DefnGrpsObjsOK = Confirm(TextS) NEXT END IF ELSE
DefnGrpsObjsOK = True END IF WEND
IF ReUsingPoses = True THEN
IF Con irm("ReDraw B C D Source Poses Even Tho Using Previous Source Poses' ") THEN ReUsingPoses = False ReUs gPoseAOnly = True DrawBCDPosesOK = False DrawBPoseOK = False DrawCPoseOK = False DrawDPoseOK = False ColoredOK = False ObjCntrsOK = False SegsOK = False
SetArrayReal BPtsXPg, 0, 0 SetArrayReal CPtsXPg, 0, 0 SetArrayReal DPtsXPg, 0, 0 SetArrayReal RawPtsXPg, 0, 0 SetArrayReal TeirpPtsXPg, 0, 0 SetA BPtsXPg, 0, 0 SetA CPtsXPg, 0, 0 SetA DPtsXPg, 0, 0
REDIM SHARED BLns(75) AS LineType REDE1 SHARED CLns(75) AS LineType REDIM SHARED DLns(751 AS LineType END IF END IF
IF ReUsingPoses = True THEN Operation = 7 SegsOK = False FindLngstSegOK = False JustifiedOK = False AllMtchPtsOK = False ELSE
Operation = 5 END IF
CASE 5 scaffold yesno WHILE MkScaffoldOK = False REDIM SHARED AScaffoldCntr(1) AS t3DPomt REDIM SHARED BSca foldCntr(1) AS t3DPomt REDIM SHARED CScaffoldCntr(1) AS t3DPomt REDIM SHARED DScaffoldCntr(1) AS t3DPomt REDIM SHARED ScaffoldDιsp(50) AS t3DPomt REDIM SHARED ImDrawιngCentrDιsp(4 AS t3DPoιnt MkScaffold MkScaffoldOK = True
WEND Operation = 6
CASE 6
WHILE DrawBCDPosesOK = False
Normallm = True
DrawBCDPoses
IF NOT Normallm THEN GOSUB NormalDrawImg
DrawBCDPosesOK = True
SegsOK = False
FindLngstSegOK = False
JustifiedOK = False
AllMtchPtsOK = False WEND IF Ooeration = 2 THEN DrawAPoseOK = False AllPosesSameAsA = False SetUpGlueLoopsOK = False CLS
ELSE
Draw glmage = False Operation = 7
END IF
CASE 7 'colorit plus mtchpts
IF GlueLoops = True THEN
IF ReUsingPoses = True OR LinkingToPreviousRun = True THEN
IF Confirm!"Redo Painting'") THEN Colorit ELSE
Colorit END IF END IF Operation = 77
CASE 77
WHILE AllMtchPtsOK = False CLS IF ReUsingPoses = True THEN
IF Confirm)"ReDo Existing MatchPts (If Any)'") THEN IF Confirm!"Are You Sure You Want To Erase And ReDo Existing MatchPts'") THEN REDIM SHARED MtchPts(50, 7) PrevMtchPtsErased = True CLS : MtchPtsParti CLS
IF Confirm!"All MtchPts OK'") THEN AllMtchPtsOK = True END IF ELSE
AllMtchPtsOK = True END IF ELSE
IF PrevMtchPtsErased = True THEN LOCATE 2, 1.
PRINT "PREVIOUS MATCH PTS ERASED'" IF Confirm!"Make MtchPts'") THEN REDIM SHARED MtchPts(50, 7) CLS : MtchPtsPartl CLS
IF Confirm!"All MtchPts OK'") THEN AllMtchPtsOK = True ELSE
NoMtchPts
AllMtchPtsOK = True END IF END IF WEND
IF NOT Normallm THEN GOSUB NormalDrawImg CLS Operation = 777
CASE 777
PRINT "Saving Source Poses Of "; PoseSaveS
OPEN "k:\Projects\Imax\Tweeny\Paul\" + PoseSaveS + ".POS" FOR BINARY AS #3
EndOfAPts = GetA(APtsXPg, 0)
EndOfBPts = GetA(BPtsXPg, 0)
EndOfCPts = GetA(CPtsXPg, 0)
EndOfDPts = GetA(DPtsXPg, 0)
Figure imgf000064_0001
PUT #3, , NoOfMtchPts
FOR I = 1 TO NoOfMtchPts
FOR J = 0 TO 7
PUT #3, , MtchPts(I, J)
NEXT NEXT
PUT #3, , NoOfGroups FOR I = 1 TO NoOfGroups
PUT #3, , Group(I)
NEXT
PUT #3, , NoOfObjects
FOR I = 1 TO NoOfObjects
PUT #3, , Object(I)
NEXT
CLOSE #3
CLS
LOCATE 4, 1 PRINT "The Source Poses You Have Drawn Have Been
Saved, Under The Name ", PoseSaveS PRINT "Including Colors, Groups, Objects, and MatchPts" PRINT PRINT "You May Quit The Program If You Want To Do Only The Source
Poses Now" IF Confirm! "Quit Now'") THEN
IF Confirm!'Are You Sure You Want To Quit Now'") THEN END END IF CLS Operation = 8
CASE 8
SegsOK = False WHILE SegsOK = False
PRINT "Making Segs.. "
MkSegs
SegsOK = True
FindLngstSegOK = False
REDIM SHARED SegLen(4)
REDIM SHARED LongestSeg(105, 1)
FindLngstSeg
REDIM SHARED FιnlSgs(105) AS FmlSgType
JstfyTe pSegsPartA
TrnsfrWhlArray JAPtsXPg, APtsXPg
TrnsfrWhlArray JBPtsXPg, BPtsXPg
TrnsfrWhlArray JCPtsXPg, CPtsXPg
TrnsfrWhlArray JDPtsXPg, DPtsXPg
WarpsOK = False
SegsOK = True WEND Operation = 9
IF ReUsingPoses = True THEN
ObjCntrsOK = False
ColoredOK = False
InstTransCheck = False
PosTransOK = False
AnchorPtsAllOK = False
WindOK = False
AvlPath = 0
WarpsNamedOK = False
NoOfWarps = 0
WarpsOK = False END IF CASE 9
WHILE ObjCntrsOK = False
REDIM SHARED BOb Cntr(3) AS t3DPomt
REDIM SHARED COb Cntr(3) AS t3DPomt
REDIM SHARED DObjCntr(3) AS t3DPomt
REDIM SHARED BGrpCntr(5) AS t3DPoιnt
REDIM SHARED CGrpCntr(5) AS t3DPoιnt
REDIM SHARED DGrpCntr(5) AS t3DPoιnt
DIM SHARED MarkedOb Cntr AS t3DPoιnt
DIM SHARED MarkedGrpCntr AS t3DPoιnt
DefnObjCntrs 'includes grp cntrs
ObjCntrsOK = True
PosTransOK = False
InstTransCheck = False WEND Operation = 10
CASE 10
IF Confirm!"Redo Some Of Source Poses' ") THEN
SELECT CASE UserChoice("ReDo Which Pose", "", "B" , "C", "D" , "") CASE 2. DrawBPoseOK = False. REDIM SHARED BLns(75) AS
LmeType- SetArrayReal BPtsXPg, 0, 0 SetA BPtsXPg, 0, 0 CASE 3 DrawCPoseOK = False- REDIM SHARED CLns(75) AS
LineType: SetArrayReal CPtsXPg, 0, 0. SetA CPtsXPg, 0, 0 CASE 4. DrawDPoseOK = False: REDIM SHARED DLns(75) AS
LineType: SetArrayReal DPtsXPg, 0, 0 SetA DPtsXPg, 0, 0 END SELECT
DrawBCDPosesOK = False Operation = 6 ELSE
Operation = 11 END IF
CASE 11
Operation = 12
CASE 12
IF NOT AllPosesSameAsA THEN CLS
OneGroupExplored = False WHILE InstTransCheck = False
REDIM SHARED TransGrfVal(0) AS TransType REDIM SHARED TEnds(4) AS SterType
IF OneGroupExplored = False THEN QuesS = "Explore Actions Available For Group(s) And Check For Line Reversals'" ELSE QuesS = "Explore Other Groups And Check For Line Reversals?" IF Confir (QuesS) THEN IF NoOfGroups > 1 THEN
WchGrp = UserChoice("Which Group'", Group(1) Label, Group(2) Label, Group(3) .Label, Group(4) .Label, Group(5) . abel) ELSE
WchGrp = 1 END IF
IF ZFixed = True THEN
PRINT "PUT ON THE RED BLUE GLASSES TO USE THE TETRAHEDRON! " SLEEP 2
ZFixedTempO = True ZFixed = False END IF
ScanPoseTrans 0, WchGrp, 0, 0
OneGroupExplored = True ELSE
InstTransCheck = True END IF REDIM SHARED TEnds(O) AS SterType
IF ZFixedTempOff = True THEN
PRINT "TAKE OFF THE RED BLUE GLASSES! "
SLEEP 2
ZFixedTempOff = False
ZFixed = True END IF
CLS
SCREEN 9 COLOR 5 WEND END IF IF OneGroupExplored = True THEN
IF Confirm("Redo Source Poses? ") THEN Operation = 2 SetUpGlueLoopsOK = False DrawAPoseOK = False AllPosesSameAsA = False ELSE
IF Confirm)"Swap Direction Of A Line?") THEN SwapLineDirection AllMtchPtsOK = False InstTransCheck = False LOCATE 3, 1: PRINT "NOTE: You Will Have To Redo Any
MatchPts You Have Made": SLEEP 2 Operation = 77 ELSE
Operation = 13 END IF END IF ELSE
Operation = 13 END IF
CASE 13
VelcrosOK = False
REDIM SHARED VelcroAGrp(4) AS VelcroType
WHILE VelcrosOK = False IF NoOfGroups > 1 THEN
IF Confirm!"Any Group Velcroed To Another Group'") THEN Velcro
IF Confirm("All Velcros OK?") THEN VelcrosOK = True ELSE
VelcrosOK = True END IF ELSE
VelcrosOK = True
END IF WEND Operation = 14
CASE 14 'does obj paths, and transform graphs for all groups of the object WHILE PosTransOK = False SyncPtlndex = 0
REDIM SHARED ObjectStatPos(3) AS t3DPomt REDIM SHARED PathRefPt(30) AS RefPtType REDIM SHARED syncpts(30) AS RefPtType REDIM SHARED SortedSyncPts(30) AS RefPtType REDIM SHARED TerminalPo t(1) AS t3DPomt REDIM SHARED FrmToFrmVelocity' (NoOfFrames) REDIM SHARED TEnds(4) AS SterType REDIM SHARED TransGrfVal(NoOfFrames) AS TransType DIM SHARED AllSumdPt AS t3DPomt DIM SHARED ObjPathPosit AS t3DPoιnt DIM SHARED AllProp AS TransType AvlPth = 0
SyncPtlndexAfterEachOb MoveAndTranε = SyncPtlndex FOR I = 1 TO NoOfObjects NoOfGroupsForThisObj = 0 FOR q = 1 TO NoOfGroups
IF Group(q) WchObj = I THEN NoOfGroupsForThisObj =
NoOfGroupsForThisObj + 1 NEXT
ThisObjMoveAndGrpTransOK = False WHILE NOT ThisObjMoveAndGrpTransOK
SyncPtlndex = SyncPtlndexAfterEachObjMoveAndTrans SPIAfterEachOb Move = SyncPtlndex IF I <> Copycat THEN DO
PathError = False
DO 'making obj path
SyncPtlndex = SPIAfterEachObjMove
CLS
IF NoOfObjects > 1 AND I > 1 THEN
TextS = "See A Frame Of Path+Action Of A Prev Obj As Ref For Drwng Path Of " + Ob ect(I) .Label + " '" IF Confirm(TextS) THEN UsingRefObject = True IF NoOfObjects = 3 THEN
SELECT CASE UserChoice("Which Object",
Object(1) .Label, Object(2) .Label, "' , "", "") CASE 1 RefObj = 1 CASE 2 RefObj = 2 END SELECT ELSE
RefObj = 1 END IF
IF NoOfGroups > 1 THEN RefGrpOK = False WHILE NOT RefGrpOK
SELECT CASE UserChoice("Which Group'", Group(l) .Label, Group(2) .Label, Group(3) .Label, Group(4) .Label, Grou (5) .Label) CASE 1: RefGrp = 1 CASE 2. RefGrp = 2 CASE 3: RefGrp = 3 CASE 4 RefGrp = 4 CASE 5: RefGrp = 5 END SELECT
IF Group( efGrp> .WchObj <> RefObj THEN BEEP: LOCATE 2, 1 PRINT Group(RefGrp) .Label; " Does Not
Belong To "; Objec (RefObj) .Label SLEEP 2
LOCATE 2, 1: PRINT SPACES(70) ELSE
RefGrpOK = True END IF WEND ELSE
RefGrp = 1 END IF
WndPtScan RefObj, Obj2, RefGrp, Grp2, 0, NoOfFrames, MarkType, eScanGrpTransPlusPath END IF END IF WchObj = I Ma SpaceRefPts WchObj = I
IF LinkingToPreviousRun = True THEN FOR P = 1 TO 5 SELECT CASE I
CASE 1. XYZ = ObjFιnalPosιtιons(P)
F alPositObjl: Mrk 0, 1 CASE 2: XYZ = ObjFmalPositions(P)
FmalPosιtOb 2 Mrk 0, 1 CASE 3. XYZ = ObjFmalPositions(P)
FιnalPosιtObj3: Mrk 0, 1 END SELECT SELECT CASE I
CASE 1. XYZ = ObjFmalPositions(1)
FmalPositObjl. Mrk 1, 1 CASE 2: XYZ = ObjFmalPositions(1)
F alPosιtObj2: Mrk 1, 1 CASE 3: XYZ = ObjFmalPositions(1) .
FmalPosιtObj3: Mrk 1, 1 END SELECT NEXT
LOCATE 2, 1: BEEP PRINT "This Is End Of Path For"; Objectd) .Label;
"In Previous Run (Square Is End) " PRINT "Start Of Next Path Will Automatically Be Matched To This" : SLEEP 4 END IF
AvlPth = AvlPth + 1 Object(I) .PathNo = AvlPth DO CLS IF UsingRefObject = True THEN
ShowGrpTranslnPathPosit RefObj, RefGrp, 0, ReferenceFrame ShowSpaceRefPts
MkUniPath Object(I) .Label, eObjPath DrawArray TempPtsXPg, -1, True WndPtScan I, Ob 2, 1, Grp2, TempPtsXPg,
GetA(TempPtsXPg, 0) , 1, eObjPathOnTempPts LOOP UNTIL Confirm*"Path In Space OK?")
IF LnEndsClose(TempPtsXPg, 1, GetA(TempPtsXPg, 0),
15) THEN MkPathCycle IF LinkingToPreviousRun = True THEN PathShiftToMatchPrevRun I
CLS
DrawPartialArray TempPtsXPg, 1, GetA(TempPtsXPg, 0) ,
-1, True SELECT CASE UserChoice(" ut Sync Pts On Path
In Space?", "", "On Path", "On Fr Chrt", "No", "") CASE 2 'on path WchObj = I ShowSpaceRefPts PlaceSyncPtsOnTempPath 1, I, "Mrk Velocity
Control Reference Pts On Space Path Of " + Object(I) .Label SortSyncPtsForApplic 1, I SwapSortedSyncPts CASE 3 'on frm chrt
ShowSyncPtLines SyncPtlndexAtStartOfObjMove PlaceSyncPtsOnFrmChrt 1, I, "Mrk Position/Timing Sync Pts For Space Path Of" + Objec (I) .Label SortSyncPtsForApplic 1, I SwapSortedSyncPts
DrawArray TempPtsXPg, -1, False PlaceFrmChrtSyncPtsOnPath 1, I CASE 4
SortSyncPtsForApplic 1, I SortedSyncPts(1) .Frame = 1 SortedSyncPts(1) .TempPtsIndex = 1 SortedSyncPts(2) .Frame = NoOfFrames
'this Mks last SortedSyncPts(syncpt) end of transform tetra graph SortedSyncPts(2) .TempPtsIndex =
GetA(TempPtsXPg, 0) END SELECT DO CLS
DrawArray TempPtsXPg, -1, False Smooth TempPtsXPg, TempPts2XPg, 2, False
TextS = "Graph Of Speed Of Movement Of " +
Object(I) .Label + " Along Path In Space" DoVelocityGraph Tei Pts2XPg, RawPtsXPg, TextS IF PathError = True THEN EXIT DO CLS
ShowSpaceRefPts WndPtScan I, Obj2, 0, Grp2, RawPtsXPg, GetA(RawPtsXPg, 0), 1, eObjPathByFrms LOOP UNTIL Confirm!"Speed Of Movement Along Space
Path OK?") IF PathError = True THEN EXIT DO IF Confirm!"Space Path Itself OK?") THEN SPIAfterEachObjMove = SyncPtlndex EXIT DO ELSE
AvlPath = AvlPath - 1 END IF LOOP 'mking obj path LOOP WHILE PathError = True TrnsfrPath RawPtsXPg, AvlPth
ELSE 'is a copycat object
Object(I) .PathNo = PathMaster
END IF
'TRANSFORM
SPIAfterEachTrans = SyncPtlndex FOR J = 1 TO NoOfGroups PathError = False ThisGrpTransOK = False Grp2 = 0
IF Group(J) .WchObj = I THEN DO
ControlGraphOutOfRange = False DO
SyncPtlndex = SPIAfterEachTrans
IF J = 1 THEN REDIM SHARED Trans1(NoOfFrames) AS
TransType IF J = 2 THEN REDIM SHARED Trans2 (NoOfFrames) AS
TransType IF J = 3 THEN REDIM SHARED Trans3(NoOfFrames) AS
TransType IF J = 4 THEN REDIM SHARED Trans4(NoOfFrames) AS
TransType IF J = 5 THEN REDIM SHARED Trans5(NoOfFrames) AS
TransType CLS
IF AllPosesSameAsA THEN AllPosesAreA
Figure imgf000071_0001
DO CLS
MkUniPath Group(J) .Label, eTScript IF LnEndsClose(TempPtsXPg, 1, GetA(TempPtsXPg,
0), 15) THEN MkPathCycle CLS
DrawArray TempPtsXPg, -1, True WndPtScan I, Obj2, J, Grp2, TempPtsXPg, GetA(TempPtsXPg, 0), 1, eScanTransOnTempGraph LOOP UNTIL Confirm)"Action Control Graph Looks OK?")
DO CLS
DrawArray TempPtsXPg, -1, True SyncPtlndex = SPIAfterEachTrans CLS DrawPartialArray TempPtsXPg, 1,
GetA(TempPtsXPg, 0), -1, True
SELECT CASE UserChoice("Use Sync Pts On Action Control Graph?", "", "On Path", "On Fr Chrt", "No", "") CASE 2 'on path
PlaceSyncPtsOnTempPath 2, J, "Mark
Timing/Transform Sync Pts For Transform Graph Of " + Group(J) .Label SortSyncPtsForApplic , J SwapSortedSyncPts
CASE 3 'on frm chrt
ShowSyncPtLines SyncPtlndexAtStartOfTrans
PlaceSyncPtsOnFrmChrt 2, J, "Mark
Timing/Trans orm Sync Pts For Transform Graph Of " + Grou (J) .Label
SortSyncPtsForApplic 2, J
SwapSortedSyncPts
DrawArray TempPtsXPg, -1, False PlaceFrmChrtSyncPtsOnPath 2, J CASE 4
SortSyncPtsForApplic 2, J SortedSyncPts(1) .Frame = 1 SortedSyncPts(1) .TempPtsIndex = 1 SortedSyncPts(2) .Frame = NoOfFrames
'this Mks last SortedSyncPts(syncpt) end of transform tetra graph SortedSyncPts(2) .TeirpPtsIndex =
GetA(TempPtsXPg, 0)
END SELECT LOOP UNTIL Confirm!"SyncPt Placement (Or Not
Using SyncPts) OK?") IF ZFixedTempOff = True THEN
PRINT "TAKE OFF THE RED BLUE GLASSES! " - 73 -
IF Confirm)"Any Lines or Objects Intermittent'") THEN
SELECT CASE UserChoice("Which", "", "Line", "Object", "' , "") CASE 2
SELECT CASE UserChoice("Method To Determine When Visible" "", "TScript", "FrameNo", "", "") 'CASE 2: MrklntermtLine 'CASE 3: ErsMnu: MrkVisInvisLine END SELECT MrkVisInvisLine CASE 3
VisInvisObj END SELECT END IF
Operation = 15
CASE 15
IF Confirm!"Use Anchor Pts'") THEN WHILE AnchorPtsAllOK = False FinishedAllAnchors = False AncRunlndex = 0 WHILE FinishedAllAnchors = False
INPUT "Name For Anchor Point"; NameS MrkOb AnchorPt
'note that a velcro slave can't have anchor pt' ' '
Found≤eg = F dWchFmlSg(FinlSgs() , ThisOne)
WchObj = FinlSgs(FoundSeg) .WchObj
Object(WchObj) .HasAnchors = 1
WchLine = FinlSgs(FoundSeg) .WchLme
WchGrp = ALns(WchLine) .WchGrp
WchSeg = FoundSeg
WchPt = ThisOne
CLS
FinishedRunsForThisPt = False
WHILE FinishedRunsForThisPt = False
LOCATE 3, 1: PRINT "ANCHORED STRIPS SO FAR:"
LOCATE 4, 1
FOR I = 1 TO NoOfAncRuns
PRINT AncRun{I) .Label; AncRun(I) .StartFrame; AncRun(l) .EndFrame
NEXT
OrderCheckOK = False
AncRunlndex = AncRunlndex + 1
LOCATE 18, 1: PRINT "THIS STRIP:"
LOCATE 19, 1
PRINT AncRun(AncRunlndex) .Label; "Strt";
AncRun(AncRunlndex) .StartFrame; " End"; AncRun(AncRunlndex) .EndFrame
NoOfAncRuns = AncRunlndex
AncRun(AncRunlndex) .Label = NameS AncRun(AncRunlndex) .WchObj = WchObj AncRun(AncRunlndex) .WchGrp = WchGrp AncRun(AncRunlndex) .WchLme = WchLine AncRun(AncRunlndex) .WchSeg = WchSeg 74
AncRun(AncRunlndex) .WchPt = WchPt
AncRun(AncRunlndex) .StartFrame = 0
LOCATE 1, 40: PRINT "Click On Anchor Start Frame"
WndPtScan WchObj, Obj2, WchGrp, Grp2, 0, NoOfFrames, 1, eScanForAnchorPts AncRun(AncRunlndex) .StartFrame = ThisOne LOCATE 18, 1: PRINT "THIS STRIP:" LOCATE 19, 1 PRINT AncRun(AncRunlndex) .Label; "Strt";
AncRun(AncRunlndex) .StartFrame; " End",
AncRun(AncRunlndex) .EndFrame
SLEEP 1
DO WHILE OrderCheckOK = False
LOCATE 1, 30: PRINT "Click On Anchor End Frame " WndPtScan WchObj, Obj2, WchGrp, Grp2, 0, NoOfFrames, 1, eScanForAnchorPts AncRun(AncRunlndex) .EndFrame = ThisOne IF AncRun(AncRunlndex) .EndFrame >= AncRun(AncRunlndex) .StartFrame THEN OrderCheckOK = True
LOCATE 18, 1. PRINT "THIS STRIP-"
LOCATE 19, 1
PRINT AncRun(AncRunlndex) .Label, "Strt";
AncRun(AncRunlndex) .StartFrame, " End"; AncRun(AncRunlndex) .EndFrame ELSE
LOCATE 20, 1
PRINT "End Frame Can't Be Before Start Frame - Do Again"
BEEP: BEEP: BEEP SLEEP 1 LOCATE 20, 1 PRINT SPACES(40) OrderCheckOK = False END IF LOOP
LOCATE 18, 1 PRINT "THIS STRIP:" LOCATE 19, 1 PRINT AncRun(AncRunlndex) .Label; "Strt";
AncRun(AncRunlndex) .StartFrame; " End"; AncRun(AncRunlndex) .EndFrame
QuesS = "More Anchored Sections For " + AncRun(AncRunlndex) .Label + "'" ErsMnu
IF NOT Confir (QuesS) THEN FinishedRunsForThisPt = True ELSE FinishedRunsForThisPt = False WEND
IF NOT Confirm!"Use Another Point As Sticky Point'") THEN FinishedAllAnchors = True WEND
IF Confirm!"Anchor Pts All OK") THEN
AnchorPtsAllOK = True ELSE
AnchorPtsAllOK = False
CLS END IF WEND - 71 -
SLEEP 2
ZFixedTempOff = False ZFixed = True END IF
DO
Grp2 = 0
TextS = "Graph Of Speed Of Progression Of
Action Of " + Group(WchGrp) .Label DoVelocityGraph TempPtsXPg, RawPtsXPg, TextS IF CalcTetFrms THEN
Done = True ELSE
CLS
PRINT "Your Control Graph has some points too far outside Tetrahedron - please redo"
BEEP
ControlGraphOutofRange = True
SLEEP 3 END IF
IF J = 1 THEN TrnsfrProp Trans1O , NoOfFrames IF J = 2 THEN TrnsfrProp Trans20 , NoOfFrames IF J = 3 THEN TrnsfrProp Trans3 () , NoOfFrames IF J = 4 THEN TrnsfrProp Trans4() , NoOfFrames IF J = 5 THEN TrnsfrProp Trans5() , NoOfFrames CLS
WndPtScan I, Obj2, J, Grp2, 0, NoOfFrames, MarkType, eScanTransByFrms LOOP UNTIL Confir ("Speed Of Action Control OK'") END IF 'all poses are the same IF NoOfGroupsForThisObj > 1 AND J > 1 THEN
IF Confirm!"Show Action Plus Path Plus Action Of A Reference Group?") THEN DO
SelectionOK = False WHILE NOT SelectionOK
SELECT CASE UserChoice!"", Group(1) .Label, Group!2) .Label, Group(3) .Label, Group(4) .Label, "") CASE 1: Grp2 = 1 CASE 2: Grp2 = 2 CASE 3: Grp2 = 3 CASE 4: Grp2 = 4 END SELECT IF Grp2 < J AND Group(Grp2) .WchObj = I THEN
SelectionOK = True ELSE
LOCATE 2, 1
PRINT "Choice Unavailable" : SLEEP 2: CLS SelectionOK = False END IF WEND
WndPtScan I, Obj2, J, Grp2, 0, NoOfFrames, MarkType, eScanGrpTransPlusPath LOOP WHILE Confirm("Show With Another Reference Group'") END IF 72
ELSE
Grp2 = 0
WndPtScan I, Ob 2, J, Grp2, 0, NoOfFrames, MarkType, eScanGrpTransPlusPath END IF
TextS = "Action Plus Path OK For " + Group(J) .Label + - > »
LOOP UNTIL Confir (TextS)
IF ControlGraphOutOfRange = True THEN LOCATE 2, 1: PRINT "Action Control Graph Was Out Of Range —You Must Redo It": SLEEP 2 LOOP WHILE ControlGraphOutOfRange = True SPIAfterEachTrans = SyncPtlndex END IF 'grp belongs to i object NEXT 'grp CLS TextS = "Path, And Group Actions, For " + Object(I) .Label
+ " All OK?" IF Confirm(TextS) THEN
ThisObjMoveAndGrpTransOK = True
SyncPtlndexAfterEachObjMoveAndTrans = SyncPtlndex ELSE
AvlPath = AvlPath - 1 END IF WEND NEXT 'object PosTransOK = True
IF Confirm!"Redo ALL Space Paths And Action Control Graphs'") THEN
IF Confirm!"Are You Sure You Want To Redo ALL Space Paths And Action Control Graphs'") THEN PosTransOK = False SyncPtlndex = 0 ELSE
PosTransOK = True END IF END IF WEND IF Confirm("Expand All Object Paths In Z'") THEN
INPUT "What Expansion Factor (2 to ')"; ZExpansionMultiplier! FOR K = 1 TO NoOfFrames
SetArrayReal P thlZPg, K, GetAReal! (PathlZPg, K) - 650 SetArrayReal Path2ZPg, K, GetAReal! (Path2ZPg, K) - 650 SetArrayReal Path3ZPg, K, GetAReal! (Path3ZPg, K) - 650
SetArrayReal PathlZPg, K, GetAReal! (PathlZPg, K) *
ZExpansionMultiplier!
SetArrayReal Path2ZPg, K, GetAReal' (PatlώZPg, K) *
ZExpansionMultiplier!
SetArrayReal Path3ZPg, K, GetAReal! (Path3ZPg, K) *
ZExpansionMultiplier!
SetArrayReal PathlZPg, K, GetAReal! (PathlZPg, K) + 650
SetArrayReal Path2ZPg, K, GetAReal! (Path2ZPg, K) + 650
SetArrayReal Path3ZPg, K, GetAReal! (Path3ZPg, K) + 650
NEXT END IF Operation = 150
CASE 150 END IF Operation = 16
CASE 16 'Wind effect CLS
IF Confirm("Use Wind Effect?") THEN WHILE WmdOK = False AvlPth = AvlPth + 1 WindPath = AvlPth DO
MkUniPath "WindPath", eWindPath LOOP UNTIL Confirm("OK?") SortSyncPtsForApplic 1, I SortedSyncPts(1) .Frame = 1 SortedSyncPts(1) .TempPtslndex = 1 SortedSyncPts(2) .Frame = NoOfFrames
'this Mks last SortedSyncPts(syncpt) end of transform tetra graph SortedSyncPts(2) .TempPtslndex = GetA(TempPtsXPg, 0) DO CLS
DrawArray TempPtsXPg, -1, False TextS = "Velocity Graph For Wind Path" DoVelocityGraph TempPtsXPg, RawPtsXPg, TextS LOOP UNTIL Confirm("Wind Velocity Graph OK?") Trns rPath RawPtsXPg, AvlPth IF Confirm("Wind Effect OK?") THEN
WindOK = True ELSE
AvlPath = AvlPath - 1 END IF WEND END IF Operation = 18
CASE 17
Operation = 18
CASE 18 'warps named
IF Confir ("Use Segment Warps?") THQJ LOCATE 3, 1
PRINT "No Of Warps Available:*; 7 - AvlPath: SLEEP 2 WHILE WarpsNamedOK = False
REDIM SHARED Warp(lO) AS WarpType NameWarps
WarpsNamedOK = True WarpsOK = False WEND IF Confirm!"No Of Warps And Names OK?") THEN
Operation = 19 ELSE
WarpsNamedOK = False Operation = 18 END IF ELSE
Operation = 20 END IF
CASE 19 'warps IF NoOfWarps > 0 THEN AvlPathAtStartOfWarps = AvlPath WHILE WarpsOK = False
REDIM SHARED Seglnfo(20) AS SegWarpInfoType REDIM SHARED WarpSrs(30, 1) AvlPath = AvlPathAtStartOfWarps AvlWarpProflArray = 0 CLS
FOR Warplndex = 1 TO NoOfWarps GrfValsOK = False
DefnSegWarp Warplndex, AvlPth, AvlWarpProflArray IF NOT Normallm THEN GOSUB NormalDrawImg IF UsesPrevPath = False AND WaveWarp = False THEN
'added if wavewarp false TrnsfrPath RawPtsXPg, AvlPth END IF IF WaveWarp = True THEN
TrnsfrWave WaveNo END IF DO
GetWarpProfile (WarpNo) LOOP UNTIL Confirm("Warp Profile OK?") J = AvlWarpProflArray 'next trnsfrs prop! along profile into a Profile array IF J = 1 THEN REDIM SHARED Profilel(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp ProfilelO, TotalSegsLen IF J = 2 THEN REDIM SHARED Profile2(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile2(), TotalSegsLen IF J = 3 THEN REDIM SHARED Profile3(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile3(), TotalSegsLen IF J = 4 THEN REDIM SHARED Profile4(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile40, TotalSegsLen IF J = 5 THEN REDIM SHARED Profile5(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile5(), TotalSegsLen IF J = 6 THEN REDIM SHARED Profile6(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp ProfileβO, TotalSegsLen IF J = 7 THEN REDIM SHARED Profile7(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile7(), TotalSegsLen IF J = 8 THEN REDIM SHARED Profile8(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp ProfileδO, TotalSegsLen IF J = 9 THEN REDIM SHARED Profile9(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp Profile9(), TotalSegsLen IF J = 10 THEN REDIM SHARED ProfilelO(TotalSegsLen) AS
WarpProfileType: TrnsfrWarp ProfilelOO, TotalSegsLen CLS NEXT IF Confirm!"Warps OK?") THEN
WarpsOK = True ELSE
WarpsOK = False END IF WEND END IF Operation = 20
CASE 20 'end menu
SELECT CASE UserChoice("", "Make Frms", "", "", " ", "End Prgrm") CASE 1 ConstructOK = False Operation = 21 CASE 5
CloseWand END END SELECT
CASE 21 'run
WHILE ConstructOK = False
DIM SHARED WarpSegDisp AS t3DPoιnt DIM SHARED SumWarpDisp AS t3DPoιnt Construct 1, NoOfFrames, NoOfObjects ConstructOK = True
WEND
Operation = 20 'end menu
END SELECT
KEY(7) ON
KEY(8) ON LOOP END
ErrorHandler. SELECT CASE ERR
CASE 53 PRINT "No *.TWS Files Yet"
NoFiles = True END SELECT RESUME NEXT
ShiftLeft
XAdjust = XAd ust - 50
RETURN
ShiftRight.
XAdjust = XAdjust + 50
RETURN
ShiftUp
YAd ust = YAdjust - 50
RETURN
ShiftDown-
YAdjust = YAdjust + 50
RETURN
ZFarther:
ZAdjust = ZAdjust - 100
LOCATE 2, 30 PRINT "Z Shift", CINTdOOOO / ZAdjust), SPACES(5)
RETURN
Z loser:
ZAdjust = ZAdjust + 100
LOCATE 2, 30- PRINT "Z Shift"; CINTdOOOO / ZAdjust); SPACE$(5)
RETURN
ZShiftNormal: ZAdjust = -500
LOCATE 2, 30: PRINT "Z Shift Normal
RETURN
ReduceXYZLeverage:
XLeverage = XLeverage * 2
YLeverage = YLeverage * 2
ZLeverage = ZLeverage * 2
LOCATE 2, 30: PRINT "XYZ Lvrage"; CINTdOO / XLeverage); SPACES(5)
RETURN
IncreaseXYZLeverage:
XLeverage = XLeverage / 2
YLeverage = YLeverage / 2
ZLeverage = ZLeverage / 2
LOCATE 2, 30: PRINT "XYZ Lvrage"; CINTdOO / XLeverage); SPACES(5)
RETURN
NormalXYZLeverage:
XLeverage = 10
YLeverage = 10
ZLeverage = 5
LOCATE 2 , 30 : PRINT "XYZ Lvrage Normal
RETURN
ReduceZLeverage:
ZLeverage = ZLeverage * 2
LOCATE 2, 30: PRINT "Z Lvrage"; CINTdOO / ZLeverage); SPACES(5)
RETURN
IncreaseZLeverage:
ZLeverage = ZLeverage / 2
LOCATE 2, 30: PRINT "Z Lvrage"; CINTdOO / ZLeverage); SPACES(5)
RETURN
NormalZLeverage:
ZLeverage = 5
LOCATE 2, 30: PRINT "Z Lvrage Normal
RETURN
MagnifyDrawImg: '*******************
IF Normallm = True AND (Operation = 3 OR Operation = 6 OR Operation
OR Operation = 19) THEN DIM AStartRefPt AS t3DPoint DIM MagAStartRefPt AS t3DPoint
SELECT CASE UserChoice("", "", "Expand", "Shift", "Reduce", "") CASE 2: PFac! = 3: MTextS = "EXPANDED" CASE 3: PFac! = 1: MTextS = "SHIFTED" CASE 4: PFac! = .3: MTextS = "REDUCED" END SELECT
TextS = "Define Center Of Area To Be " + MTextS DefnPt MagCenter, TextS, "Magnify", 1
ScreenCenter.x = 320 ScreenCenter.y = 175 ScreenCenter.Z = MagCenter.Z MagDiff.x ScreenCenter MagCenter x MagDiff y ScreenCenter MagCenter y
FOR I = 1 TO GetA(APtsXPg 0) SetArrayReal APtsXPg, I, GetAReal ' (APtsXPg, I) MagDiff SetArrayReal APtsYPg, I, GetAReal ' (APtsYPg, I) MagDiff x' = ScreenCenter.x - GetAReal' (APtsXPg, I) y' = ScreenCenter.y - GetAReal1 (APtsYPg, I) Z' = ScreenCenter Z - GetAReal' (APtsZPg, I) magx' = x' * PFac' πvagy' = y' * PFac' magz ' = Z' * PFac' SetArrayReal APtsXPg, I, ScreenCenter x magx' SetArrayReal APtsYPg, I, ScreenCenter y magy' SetArrayReal APtsZPg, I, ScreenCenter Z magz '
NEXT
FOR I = 1 TO GetA(BPtsXPg, 0) SetArrayReal BPtsXPg, I, GetAReal' (BPtsXPg, I) MagDiff.x SetArrayReal BPtsYPg II,, GetAReal' (BPtsYPg, I) MagDiff y x1 = ScreenCenter x GetAReal' (BPtsXPg, I) y' = ScreenCenter y GetAReal' (BPtsYPg, I) Z ' = ScreenCenter Z GetAReal' (BPtsZPg, I) magx' = x' * PFac' magy' = y' * PFac' magz ' = Z ' * PFac' SetArrayReal BPtsXPg, SetArrayReal BPtsYPg, SetArrayReal BPtsZPg,
NEXT
FOR I = 1 TO GetA(CPtsXPg, SetArrayReal CPtsXPg,
Figure imgf000081_0001
MagDiff x SetArrayReal CPtsYPg I, GetAReal ' (CPtsYPg, I) MagDiff y x' = ScreenCenter x GetAReal' (CPtsXPg, I) y' = ScreenCenter y GetAReal' (CPtsYPg, I) Z' = ScreenCenter Z GetAReal ' (CPtsZPg I) magx' = x1 * PFac' magy' = y' * PFac' magz' = Z ' * PFac' SetArrayReal CPtsXPg, I, ScreenCenter x - magx' SetArrayReal CPtsYPg, I, ScreenCenter y - magy' SetArrayReal CPtsZPg I, ScreenCenter Z - magz '
NEXT
FOR I = 1 TO GetA(DPtsXPg,
SetArrayReal DPtsXPg, I, GetAReal' (DPtsXPg, I) MagDiff SetArrayReal DPtsYPg, I, GetAReal' (DPtsYPg, I) MagDiff x' = ScreenCente .x - GetAReal ' (DPtsXPg, I) y1 = ScreenCenter y - GetAReal' (DPtsYPg, I) Z' = ScreenCenter.Z - GetAReal' (DPtsZPg, I) magx' = x' * PFac' magy' = y' * PFac' magz1 = Z1 * PFac1 SetArrayReal DPtsXPg, ScreenCenter. - magx' SetArrayReal DPtsYPg, ScreenCenter y - magy' SetArrayReal DPtsZPg, ScreenCenter.Z - magz '
NEXT
CLS
IF Operation = 19 THEN
FOR I = 1 TO GetA(TempPtsXPg, 0) SetArrayReal TeπpPtsXPg, I, GetAReal ' (TempPtsXPg, I)+MagDιff.x SetArrayReal TeirpPtsYPg, I, GetAReal1 (TempPtsYPg, I)+MagDιff y 1 = ScreenCenter. - GetAReal' (TempPtsXPg, I) y' = ScreenCenter.y - GetAReal' (TempPtsYPg, I) Z' = ScreenCenter.Z - GetAReal' (TempPtsZPg, I) magx' = x' * PFac1 magy' = y' * PFac! magz' = Z' * PFac! SetArrayReal TempPtsXPg, ScreenCenter.x - magx' SetArrayReal TempPtsYPg, ScreenCenter.y - magy! SetArrayReal TempPtsZPg, ScreenCenter.Z - magz! NEXT
DrawArray TempPtsXPg, True END IF
SELECT CASE WchPoseForMag CASE 1. ShowWhllmage 1, -1 CASE 2. ShowWhllmage 2, -1 CASE 3. ShowWhllmage 3, -1 CASE 4: ShowWhllmage 4, -1 END SELECT
IF Drawinglmage = True THEN IF LnNo = MagLmesToDraw THEN
PutDrwMnuOnScrn TextS, WchPoseForMag, 1 ELSE
PutDrwMnuOnScrn TextS, WchPoseForMag, 0 END IF END IF
FOR s = 1 TO 2 SOUND 1000, 2 SOUND 2000, 2 NEXT
LOCATE 2, 30: PRINT "Image " + MTextS NormalIrr = False END IF KEY(5) ON RETURN
NormalDrawImg:
IF NOT Normallm THEN
CLS
FOR I = 1 TO GetA(APtsXPg, 0) x! = ScreenCenter.x - GetAReal' (APtsXPg, I) y1 = ScreenCenter.y - GetAReal! (APtsYPg, I)
Z' = ScreenCenter.Z - GetAReal' (APtsZPg, I) norrπx' = x' / PFac1 norm 1 = y' / PFac! nor z' = Z' / PFac!
SetArrayReal APtsXPg, I, ScreenCenter.x - normx'
SetArrayReal APtsYPg, I, ScreenCenter.y - normy'
SetArrayReal APtsZPg, I, ScreenCenter.Z - normz'
SetArrayReal APtsXPg, I, GetAReal' (APtsXPg, I) - MagDiff.x
SetArrayReal APtsYPg, I, GetAReal' (APtsYPg, I) - MagDiff.y
NEXT
FOR I = 1 TO GetA(BPtsXPg, 0) x' = ScreenCenter. - GetAReal! (BPtsXPg, I) y' = ScreenCenter.y - GetAReal'(BPtsYPg, I) Z' = ScreenCenter.Z - GetAReal! (BPtsZPg, I) normx' = ' / PFac! normy1 = y1 / PFac! normz' = Z' / PFac! Jl -
SetArrayReal BPtsXPg, I ScreenCenter x - normx' SetArrayReal BPtsYPg, I ScreenCenter y - normy' SetArrayReal BPtsZPg, I, ScreenCenter.Z - normz' SetArrayReal BPtsXPg, I, GetAReal' (BPtsXPg, I) - MagDiff x SetArrayReal BPtsYPg, I, GetAReal' (BPtsYPg, I) - MagDiff y NEXT
FOR I = 1 TO GetAfCPtsXPg, 0) x' = ScreenCenter x GetAReal' (CPtsXPg, I) y' = ScreenCenter y GetAReal ' (CPtsYPg, I) Z' = ScreenCenter Z GetAReal' (CPtsZPg, I) normx' = x' / PFac' normy' = y' / PFac ' normz' = Z' / PFac' SetArrayReal CPtsXPg, I, ScreenCenter x - normx SetArrayReal CPtsYPg, I, ScreenCenter y - normy SetArrayReal CPtsZPg, I, ScreenCenter.Z - normz SetArrayReal CPtsXPg, I, GetAReal' (CPtsXPg, I) MagDiff x SetArrayReal CPtsYPg, I, GetAReal' (CPtsYPg, I) MagDiff y NEXT
FOR I = 1 TO GetA(DPtsXPg, 0) x' = ScreenCenter x GetAReal ' (DPtsXPg, I) y1 = ScreenCenter y GetAReal ' (DPtsYPg, I) Z' = ScreenCenter.Z GetAReal' (DPtsZPg, I) normx' = x1 / PFac' normy' = y' / PFac ' normz ' = z' / PFac ' SetArrayReal DPtsXPg, I ScreenCenter x - normx SetArrayReal DPtsYPg, I, ScreenCenter y - normy SetArrayReal DPtsZPg, I, ScreenCenter Z - normz SetArrayReal DPtsXPg, I, GetAReal' (DPtsXPg, I) - MagDiff.x SetArrayReal DPtsYPg, I, GetAReal' (DPtsYPg, I) - MagDiff y NEXT CLS IF Operation = 19 THEN
FOR I = 1 TO GetA(TempPtsXPg, 0) x' = ScreenCenter x - GetAReal ' (TempPtsXPg, I) y1 = ScreenCenter y - GetAReal' (TempPtsYPg I)
Z' = ScreenCenter Z - GetAReal ' (TempPtsZPg, I) norm ' = x' / PFac' normy' = y' / PFac' normz ' = Z' / PFac '
SetArrayReal TempPtsXPg, I, ScreenCenter.x - normx'
SetArrayReal TempPtsYPg, I, ScreenCenter.y - normy'
SetArrayReal TempPtsZPg, I, ScreenCenter.Z - normz'
SetArrayReal TempPtsXPg, I, GetAReal' (TempPtsXPg, I) - MagDiff x
SetArrayReal TempPtsYPg, I, GetAReal' (TempPtsYPg, I) - MagDiff y NEXT
DrawArray TempPtsXPg, -1 True END IF
SELECT CASE WchPoseForMag
CASE 1 ShowWhllmage 1, -1
CASE 2. ShowWhllmage 2, -1
CASE 3: ShowWhllmage 3, -1
CASE 4 ShowWhllmage 4, -1 END SELECT IF DrawingImage = True THEN
IF LnNo = MagLmesToDraw THEN
PutDrwMnuOnScrn TextS, WchPoseForMag,
ELSE PutDrwMnuOnScrn TextS, WchPoseForMag, 0 END IF END IF
Normallm = True FOR s = 1 TO 2 SOUND 1000, 2 SOUND 2000, 2 NEXT
LOCATE 2, 30: PRINT "Image NORMAL" END IF KEY(7) ON RETURN
REM SSTATIC
SUB Ad MtchPt (WchPose, WchLine, MtchPtNdx)
ErsMnu
ImToFix = WchPose
NdxToFix = MtchPtNdx
SELECT CASE WchPose CASE 1
Start = 1. Finish = GetA(APtsXPg, 0) CASE 2
GetStartFinish BLns0 , WchLine, Start, Finish CASE 3
GetStartFinish CLns() , WchLine, Start, Finish CASE 4
GetStartFinish DLns 0 , WchLine, Start, Finish END SELECT PtMove = 6
LOCATE 8, 1. PRINT "Fast" PtPosit = MtchPts(NdxToFix, ImToFix) 'this lets you choose done right away if posit is ok LOCATE 10, 1: PRINT "Original", PtPosit DO
AS = "Fast": BS = "Back" C$ = "Forward": D$ = "Done" E$ = "Slow' WndChs "", AS, B$, CS, D$, ES, Ans$, 0 IF Ans$ = D$ THEN
MtchPts(NdxToFix, ImToFix) = PtPosit ErsMnu EXIT DO ELSE
GetlmFxXYZ ImToFix, PtPosit Mrk 0, 1 SELECT CASE Ans$ CASE AS
PtMove = 6
LOCATE 8, 1. PRINT "Fast" CASE ES
PtMove = 1
LOCATE 8, 1: PRINT "Slow" CASE CS
PtPosit = PtPosit + PtMove
IF PtPosit > Finish THEN PtPosit = PtPosit - PtMove CASE B$
PtPosit = PtPosit - PtMove
IF PtPosit < Start THEN PtPosit = PtPosit + PtMove END SELECT
GetlmFxXYZ ImToFix, PtPosit Mrk 0, 1 LOCATE 11, 1. PRINT "Now"; PtPosit END IF LOOP
CS = "Finished' DS = "Adj' WndChs "", "x", C$, DS, 'x , Ans$, 1 END SUB
SUB AdjObjPathstartEnd (Array, NoOfArrayPts) REDIM TerminalPositDiff(1) AS t3DPoιnt TerminalPositDiff(0) .x = TerminalPoint(0) .x ■ GetAReal' (Array, 1) TerminalPositDiff(0) y = TerminalPoint(0) y - GetAReal' (Array + 1, 1) Term alPositDiff(0) Z = TerminalPo t(0) .Z - GetAReal' (Array + 2, 1)
TermmalPositDiff(1) .x = TerminalPomt(1) .x -
GetAReal' (Array, (GetA(Array, 0)))
TermmalPositDiff(1) .y = TerminalPomt(1) y -
GetAReal' (Array + 1, (GetA(Array, 0) ) )
Term alPositDiff(1) Z = TerminalPomt(1) Z -
GetAReal' (Array + 2, (GetA(Array, 0)))
Zoop = -1
Glob = NoOfArrayPts + 1 FOR K = 1 TO NoOfArrayPts Zoop = Zoop + 1 Glob = Glob - 1
XChange' = (TerminalPositDiff(0) .x * (NoOfArrayPts - Zoop)
GetA(TempPtsXPg, 0) ) + (TermmalPositDiff(1) .x
(NoOfArrayPts - Glob) / GetA(TempPtsXPg, 0))
YChange' = (TerminalPositDiff(0) y * (NoOfArrayPts - Zoop)
GetA(TempPtsXPg, 0) ) + (TermmalPositDiff(1) .y
(NoOfArrayPts - Glob) / GetA(TempPtsXPg, 0) )
ZChange' = (TerminalPositDiff(0) .Z * (NoOfArrayPts - Zoop)
GetA(TempPtsXPg, 0) ) + (TermmalPositDiff(1) Z
(NoOfArrayPts - Glob) / GetA(TempPtsXPg, 0))
SetArrayReal Array K, GetAReal' (Array, K) + XChange' SetArrayReal Array + 1 K, GetAReal' (Array + 1, K) + YChange' SetArrayReal Array + 2 , K, GetAReal' (Array + 2, K) + ZChange'
NEXT
DrawPartialArray Array, 1, GetA(Array, 0), -1, True
TerminalsMarked = False
END SUB
SUB AdjPa hAlongXYZ (WchPath) DIM PathStartPt AS t3DPoιnt DIM PathEndPt AS t3DPomt
DO shift = 0
BS = "X". CS = "Y DS = "Z": ES = "Quit" WndChs "On Which Axis'", "x", BS, C$, D$, ES, Ans$, 0 Ax sS = Ans$ SELECT CASE Ans$ CASE "X"
B$ = "Left". C3 = "Right" CASE "Y"
B$ = "Up" . CS = "Down" CASE "Z"
B$ = "Farther CS = "Closer" CASE ES EXIT DO END SELECT DO
DS = "Done " + AxisS
WndChs "Which Direction'", "x", BS, CS, D$, "x", AnsS, 0 SELECT CASE Ans$ CASE BS shift = shift - 4 CASE CS shift = shift + 4 CASE D$ EXIT DO END SELECT
LOCATE 5, 1: PRINT "shifting path "; WchPath; AnsS; " "; shift LOOP
SELECT CASE WchPath CASE 1
PathStartPt.x = GetAReal(Pa hlXPg, 1) PathStartPt.y = GetAReal (PathlYPg, 1) PathStartPt.Z = GetAReal (PathlZPg, 1) PathEndPt.x = GetAReal(PathlXPg, GetAIPathlXPg, 0)) PathEndPt.y = GetAReal(PathlYPg, GetA(PathlXPg, 0)) PathEndPt.Z = GetAReal(PathlZPg, GetAfPathlXPg, 0)) CASE 2
PathStartPt.x = GetAReal(Path2XPg, 1) PathStartPt.y = GetAReal(Path2YPg, 1) PathStartPt.Z = GetAReal(Pa h2ZPg, 1) PathEndPt.x = GetAReal(Path2XP , GetA(Path2XPg, 0)) PathEndPt.y = GetAReal(Path2YPg, GetA(Path2XPg, 0)) PathEndPt.Z = GetAReal(Path2ZPg, GetA(Path2XPg, 0)) CASE 3
PathStartPt.x = GetAReal (Path3XPg, 1) PathStartPt.y = GetAReal(Pa h3YPg, 1) PathStartPt.Z = GetAReal(Path3ZPg, 1) PathEndPt.x = GetAReal(Path3XPg, GetA(Path3XPg, 0)) PathEndPt y = GetAReal(Path3YPg, GetA(P th3XPg, 0)1 PathEndPt.Z = GetAReal(Path3ZPg, GetA(Path3XPg, 0)) END SELECT
TerminalPoint(0) = PathStartPt TerminalPomt(1) = PathEndPt
SELECT CASE AxisS CASE "X"
TerminalPomt(0) .x = PathStartPt.x + shift TerminalPomt(1).x = PathEndPt.x + shift CASE "Y"
TerminalPomt(0) .y = PathStartPt.y + shift Term alPoint ) .y = PathEndPt.y + shift CASE "Z"
TerminalPomt(0) .Z = PathStartPt.Z + shift TermmalPointd) .Z = PathEndPt.Z + shift END SELECT TerminalsMrked = True
SELECT CASE WchPath CASE 1
Ad ObjPathStartEnd PathlXPg, GetAIPathlXPg, 0)
ShowOb Path PathlXPg, 1 CASE 2 A jObjPathStartEnd Path2XPg, GetA(Path2XPg, 0) ShowObjPath Path2XPg, 1 CASE 3
AdjObjPathStartEnd Path3XPg, GetA(Path3XPg, 0) ShowObjPath Path3XPg, 1 END SELECT SLEEP 1 LOOP
END SUB
SUB AllPosesAreA
FOR I = 1 TO NoOfFrames
TransGrfVal (I) .PropA = 1
TransGrfVal(I) .PropB = 0
TransGrfVal(I) .PropC = 0
TransGrfVal(I) .PropD = 0 NEXT END SUB
FUNCTION CalcDistBetPts' (Ptl AS TScriptWayPt, Pt2 AS TScriptWayPt) x' = (Ptl. ocat.x - Pt2.Locat. ) y' = (Ptl.Locat.y - Pt2.Locat.y) Z1 = (Ptl.Locat.Z - Pt2.Locat.Z)
CalcDistBetPts1 = SQR(x' * x' + y * y' + Z' * Z!) END FUNCTION
SUB CalcFlatXY
LXRXY.lx = XYZ.x - 1
LXRXY.rx = XYZ.x
LXRXY y = XYZ.y
IF LXRXY.lx < LeftBound THEN LXRXY.lx = LeftBound
IF LXRXY.rx < LeftBound THEN LXRXY.rx = LeftBound
IF LXRXY.lx > RightBound THEN LXRXY.lx = RightBound IF LXRXY.rx > RightBound THEN LXRXY rx = RightBound
IF LXRXY y < Topbound THEN LXRXY y = Topbound
IF LXRXY y > BottomBound THEN LXRXY y = BottomBound
END SUB
SUB CalcFramePositions (aDrawnPath, aFramePosArray) SetA aFramePosArray, 0, NoOfFrames ReqdDist' = 0
FOR Frame = 1 TO NoOfFrames CurrDist! = 0
ReqdDist' = ReqdDist' + FrmToFrmVelocity' (Frame) PtNo = 1
NextDist1 = DistToNextPoint' (aDrawnPath, PtNo) DO WHILE CurrDist' + NextDist! < ReqdDist' PtNo = PtNo + 1 IF PtNo > 20000 THEN PathError = True
LOCATE 2, 1 PRINT "Path Error —Redo Path": SLEEP 2 EXIT DO END IF
CurrDist' = CurrDist' + NextDist' NextDist' = DistToNextPoint1 (aDrawnPath, PtNo) LOOP IF PathError = True THEN GOTO GetOut PctNeeded' = (ReqdDist' - CurrDist') / NextDist'
SetArrayReal aFramePosArray + 0, Frame, GetAReal' (aDrawnPath + O.PtNo)
* (1 - PctNeeded') + GetAReal' (aDrawnPath + 0, PtNo + 1)
* PctNeeded!
SetArrayReal aFramePosArray + 1, Frame, GetAReal' (aDrawnPath + l.PtNo)
* (1 - PctNeeded') + GetAReal' (aDrawnPath + 1, PtNo + 1)
* PctNeeded'
SetArrayReal aFramePosArray + 2, Frame, GetAReal' (aDrawnPath + 2,PtNo)
* (1 - PctNeeded') + GetAReal' (aDrawnPath + 2, PtNo + 1)
* PctNeeded' NEXT
PtCount = GetA(aDrawnPath, 0)
SetArrayReal aFramePosArray + 0, NoOfFrames, GetAReal' (aDrawnPath + 0,
PtCount) SetArrayReal aFramePosArray + 1, NoOfFrames, GetAReal1 (aDrawnPath + 1,
PtCount) SetArrayReal aFramePosArray + 2, NoOfFrames, GetAReal' (aDrawnPath + 2,
PtCount) GetOut END SUB
SUB CalcLXRXY
LXRXY lx = XYZ. - XYZ.Z / ZDlvisor
LXRXY.rx = XYZ.x + XYZ.Z / ZDlvisor
LXRXY.y = XYZ.y
IF LXRXY.lx < LeftBound THEN LXRXY.lx = LeftBound
IF LXRXY.rx < LeftBound THEN LXRXY.rx = LeftBound
IF LXRXY.lx > RightBound THEN LXRXY.lx = RightBound
IF LXRXY.rx > RightBound THEN LXRXY.rx = RightBound
IF LXRXY.y < Topbound THEN LXRXY y = Topbound
IF LXRXY.y > BottomBound THEN LXRXY.y = BottomBound
END SUB
SUB CalcMrkrPts
MrkrPts.lx = LXRXY.lx - 4
MrkrPts.rx = LXRXY.rx - 4 '-4 is displacement to center of cursor
MrkrPts.y = LXRXY.y - 4
END SUB
FUNCTION CalcTDist1 (Vertex) x' = (TPts(Vertex) .x - XYZ.x) y' = (TPts(Vertex) .y - XYZ.y)
Z' = (TPts(Vertex) .Z - XYZ.Z)
CalcTDist! = SQR(x' * x' + y' * y' + Z' * Z' )
END FUNCTION
FUNCTION CalcTetFrms
CalcTetFrms = True
FOR I = 1 TO NoOfFrames
XYZ.x = GetAReal' (RawPtsXPg, I)
XYZ.y = GetAReal! (RawPtsYPg, I)
XYZ.Z = GetAReal! (RawPtsZPg, I)
IF CalcTProps(I) = False THEN CalcTetFrms = False EXIT FOR
END IF NEXT END FUNCTION
FUNCTION CalcTProps (WchFrame) DIM DιsToVert(4) AS SINGLE
FOR I = 1 TO 4
DιsToVert(I) = Limits' (CalcTDist' (I) , 0', 350') NEXT
TransGrfVal(WchFrame) .PropA = 1 - DisToVertd) / 350 TransGrfVal(WchFrame) .PropB = 1 - DιsToVert(2) / 350 TransGrfVal(WchFrame) PropC = 1 - DιsToVert(3) / 350 TransGrfVal(WchFrame) PropD = 1 - DιsToVert(4) / 350 SumProp' = TransGrfVal(WchFrame) .PropA + TransGrfVal(WchFrame) .PropB TransGrfVal (WchFrame) .PropC + TransGrfVal(WchFrame) .PropD IF SumProp' <> 0 THEN CalcTProps = True Mkl' = 1 / SumProp'
TransGrfVal(WchFrame) .PropA = TransGrfVal(WchFrame) .PropA * Mkl' TransGrfVal(WchFrame) .PropB = TransGrfVal(WchFrame) PropB * Mkl' TransGrfVal(WchFrame) PropC = TransGrfVal (WchFrame) PropC * Mkl' TransGrfVal(WchFrame) PropD = TransGrfVal(WchFrame) PropD * Mkl' ELSE
CalcTProps = False END IF
END FUNCTION
SUB ChooseGrp (ChosenGrp, GrpTextS) WHILE NOT GroupOK
ChosenGrp = UserChoice(GrpTextS, Group(1) .Label, Group(2) .Label, Group(3).Label, Group(4).Label, Group(5) Label)
IF ConfirmO'Is " + Group(ChosenGrp) .Label + " Correct'") THEN GroupOK = True WEND END SUB
SUB ChooseLineColor LOCATE 2, 30
INPUT "Line Color Number ColorNumber LOCATE 2, 30 PRINT SPACES (40)
IF ColorNumber > NoOfColors THEN NoOfColors = ColorNumber LineColor = ColorNumber
LOCATE 2, 50: PRINT "Line Color:", LineColor MyDelay 1
END SUB
SUB ChooseOb (ChosenObj, Ob TextS) WHILE NOT Ob OK
ChosenObj = UserChoice(ObjTextS, Object(1) .Label, Objec (2) .Label,
Objec (3) .Label, "", "") IF ConfirmO'Is " + Object(ChosenObj) .Label + " Correct'") THEN
ObjOK = True WEND ErsMnu END SUB
SUB ClearMtchPts FOR I = 0 TO 10 FOR J = 0 TO 7
MtchPts(I, J) = 0 NEXT
NEXT
MtchPtsOK = False
END SUB
SUB Colorit ColoringOK = False WHILE NOT ColoringOK FOR I = 1 TO NoOfLines CLS
IF ALns(I) .Looped = 1 THEN ShowLn 1, I, -1
IF Confir ("Paint This Loop'") THEN INPUT "Fill Color Number", ColorNumber
IF ColorNumber > NoOfColors THEN NoOfColors = ColorNumber ALns(I) .PaintCol = ColorNumber ELSE
ALns(I) .PaintCol = -1 END IF END IF NEXT
IF Confιrm("Coloring OK'") THEN ColoringOK = True WEND END SUB
FUNCTION Confirm (aQuestionS)
DIM Done AS INTEGER
ErsMnu
WndMnu aQuestionS, "x", "Yes", "No", "x", "x"
Done = False
WHILE Done = False
Wn ln
CalcFlatXY
CalcMrkrPts
ShowFlatCrsr
IF XYZ y > 0 AND XYZ.y < 16 THEN SELECT CASE XYZ.x
CASE MBXVals(3) TO MBXVals(4) Done = True. Confirm = True CASE MBXVals(5) TO MBXVals(6) Done = True. Confirm = False END SELECT
END IF WEND
MyDelay 1 ErsMnu END FUNCTION
SUB Construct (BegmFrame, F ishFrame, NoOfObjectsForThisRun)
StartOver.
TotalNoOfFrames = FmishFrame - BegmFrame + 1
COLOR 5
REDIM SegInfoLst(105)
DIM Disp AS t3DPomt, StaticAncVal AS t3DPoιnt, PtVal AS t3DPoιnt,
AncDisp AS t3DPoιnt REDIM 0bjZDlSt(6) AS ZDlStType SCREEN 9, , 0, 0 apage = 0 vpage = 1 K = 0
EndOfLastTransfer = 0
FinalRecordNo = 0- LastF alRecordNo = 0 IF OneFrameOnly = False THEN CLS AncRun = False GetObjDispVals = False Second = 1 ZCorrection = 40 LensFocalLength = 35
'INPUT "ZCorrec is 40, ZCorrection (larger no = smaller image)"
ZCorrection 'INPUT "Lens is 35, Lens (larger no = longer focal length)";
LensFocalLength
IF OneFrameOnly = True THEN
Records = "No"
CLS
GOTO ShowOneFrame END IF REDOFLUFFS: COLOR 5 RecordDecisionOK = False
WHILE NOT RecordDecisionOK
SELECT CASE UserChoice("RecordS4 Or RecordS6 Or View Mono'", " "RecordS4", "RecordS6", "ViewMono", "") CASE 2: Records = "RecordS4": RecordDecisionOK = True CASE 3: Records = "RecordS6": RecordDecisionOK = True CASE 4
Records = "No"
IF Confirm!"You Will Not Be Able To Play Back This Run On Sandde4. Is That OK'") THEN RecordDecisionOK = True END IF END SELECT WEND
CLS
SELECT CASE Records CASE "RecordS4"
SnapNameS = LEFTS(RunNameS, 2)
PRINT "SnapNameS:"; SnapNameS: SLEEP 1
COLOR 5
SCREEN 9, , 1, 1
CLS
LOCATE 1, 1: PRINT SnapNameS; TotalNoOfFrames
SCREEN 9, , 0, 0
CLS
LOCATE 1, 1: PRINT SnapNameS; TotalNoOfFrames
Snapshot ASC(LEFTS(SnapNameS, 1) ) * 256 +
ASC(RIGHTS(SnapNameS, 1) ) , NoOfFrames
SCREEN 9, , 1, 1
CLS
SCREEN 9, , 0, 0
CLS CASE "Records6"
FOR I = 1 TO NoOfLines
IF ALns(I) .LineCol > NoOfColors THEN
NoOfColors = ALns(I) .LineCol IF ALns(I) .PaintCol > NoOfColors THEN
NoOfColors = ALns(I).PaintCol NEXT S6SaveName$ = "K:\PROJECTS\IMAX\IMPORTS\" + RunNameS + " SNI" OPEN S6SaveName$ FOR RANDOM AS #2 LEN = LEN(TransferInfo) WπteXFerlnfo ePaletteSize, NoOfColors, 0, 0, 0 END SELECT ShowOneFrame: COLOR 5
FOR FrameNo = BeginFrame TO FinishFrame D sp.x = 0: Disp.y = 0: Disp.Z = 0
EndOfLastTransfer = 0: SaveWhllmgIndex = 0. SaveLmelndex = 0 TotalPts = 0
IF SaveThisRun = True THEN RecordFrameNo = FrameNo + EndFrameOfPrevRun
ELSE RecordFrameNo - FrameNo
IF Records = "RecordSδ" THEN
LOCATE 1, 10: PRINT "Recording ; RunNameS; " To S6 ImportFile, Frame",- RecordFrameNo
WriteXFerlnfo eStartCel, TotalNoOfFrames, 0, 0, 0 END IF
ZDistlndex = 0 IF OneFrameOnly = True THEN LOCATE 5, 1- PRINT FrameNo
'determine z dist for each ob for this frame:
FOR ObjNo = 1 TO NoOfObjectsForThisRun
ZDistlndex = ZDistlndex + 1
WchObjPath = Objec (ObjNo) .PathNo
PathArrayPositPtr FrameNo, WchObjPath, ObjPathPosit
ObjZDist(ZDistlndex) -Dist = ObjPathPosit.Z +
Object(ObjNo) .FakeZShift
ObjZDist(ZDistlndex) .ObjNo = ObjNo NEXT
'sort object z distances:
FOR I = ZDistlndex - 1 TO 1 STEP -1 FOR J = 1 TO I
IF ObjZDist(J) .Dist > Ob ZDistfJ + 1) .Dist THEN SWAP ObjZDist(J) .Dist, ObjZDistlJ + 1) .Dist SWAP ObjZDιst(J) .ObjNo, ObjZDistfJ + 1) .ObjNo END IF NEXT NEXT
'start actual animation construction:
FOR r = 1 TO ZDistlndex 'this goes thru objects in order of their zd st ObjNo = ObjZDιst(r) .ObjNo 'from back to front IF FrameNo >= Object(ObjNo) .StartVis AND FrameNo <= Object(ObjNo) .EndVis THEN
K = 0
DO WHILE K <= NoOfAncRuns K = K + 1 IF AncRun(K) .WchObj = ObjNo THEN
IF FrameNo >= AncRun(K) .StartFrame AND FrameNo <= AncRun(K) .EndFrame THEN AncRun = True
AncObj = ObjNo
AncGrp = AncRun(K) .WchGrp
AncLme = AncRun(K) .WchL e
AncSeg = AncRun(K) .WchSeg
AncPt = AncRun(K) .WchPt
FirstAncFrm = AncRun(K) .StartFrame
LastAncFrm = AncRun(K) .EndFrame
Second = 2 'will do two passes —first to get displacement, second to actually draw whole object in displaced psition EXIT DO ELSE
AncRun = False
Second = 1 'will do only one unanchored pass END IF END IF LOOP
FOR Pass = 1 TO Second
GetObjDispVals = (AncRun = True AND Pass = 1) WchObjPath = Object(ObjNo) .PathNo
PathArrayPositPtr FrameNo, WchObjPath, ObjPathPosit
IF Pass = 2 THEN
AOb Cntr(ObjNo) x = AObjCntr(ObjNo) .x - AncDisp.x AObjCntr(ObjNo) y = AObjCntr(Obj o) .y - AncDisp.y AObjCntr(ObjNo) .Z = AObjCntr(Ob No) .Z - AncDisp.Z
END IF
,******* wllen using ancs maybe need to make ob cntr the pathposit so link can connect properly
Disp.x = ObjPathPosit.x - AObjCntr(Obj o) .x Disp.y = ObjPathPosi .y - AObjCntr(ObjNo) y Disp.Z = ObjPathPosit.Z - AOb Cntr(Ob No) .Z
NegZ' = ObjPathPosit.Z / ZDivisor - ZCorrection PFac' = LensFocalLength / NegZ'
IF GetObjDispVals = True THEN
BeginGrp = AncGrp
FinGrp = AncGrp ELSE
BeginGrp = 1
FinGrp = NoOfGroups END IF
FOR GroupNo = BeginGrp TO FinGrp
IF Group(GroupNo) .WchObj = ObjNo THEN TransPtr FrameNo, GroupNo, AllProp FOR H = 1 TO NoOfVelcros
IF VelcroAGrp(H) .SlaveGrp = GroupNo THEN ObjPathPosit = VelcroAGrp(H) .HookXYZVals Disp.x = ObjPathPosit.x - AGrpCnt (GroupNo) x Disp.y = Ob Pa hPosit.y - AGrpCntr(GroupNo) y Disp.Z = Ob P thPosit.Z - AGrpCntr(GroupNo) Z
NegZ' = VelcroAGrp(H) .HookXYZVals.Z / ZDlvisor
ZCorrection PFac' = LensFocalLength / NegZ' END IF NEXT
IF GetObjDispVals = True THEN
BeginLine = AncLine
FinL e = AncLine ELSE
BeginLine = 1
FinLine = NoOfLmes END IF
FOR LineNo = BeginLine TO FinLine wch lines belong to the grp SaveLinelndex = 0
IF GetObjDispVals = False THEN TempLineBegFinlndex = 0 TransPtr FrameNo, GrpNo, AllProp IF ALns(LιneNo) .WchGrp = GroupNo AND ALns(LineNo) .StartVis <= FrameNo AND ALns(LιneNo) .EndVis >= FrameNo THEN Record gLine = LineNo IntermitLine = False IF ALns(LineNo) .Intermit = True THEN
TransPtr FrameNo, GrpNo, AllProp 'this is to see if line should be shown IF ALns(LineNo) .KeyFor = 1 AND
ALns(LineNo) Threshold < AllProp PropA THEN IntermitLine = True IF ALns(LineNo) KeyForm = 2 AND
ALns(LineNo) .Threshold < AllProp PropB THEN IntermitLine = True IF ALns(LineNo) .KeyForm = 3 AND
ALns(LineNo) .Threshold < AllProp.PropC THEN IntermitLine = True IF ALns(LineNo) .KeyForm = 4 AND
ALns(LineNo) .Threshold < AllProp.PropD THEN IntermitLine = True END IF IF ALns(LineNo) .Intermit = False OR
(ALns(LineNo) .Intermit = True AND IntermitLine = True) THEN 'either a not intermit line or tscπpt meets threshold criterion
IF GetObjDispVals = True THEN
BegmSeg = AncSeg
FinSeg = AncSeg ELSE
BegmSeg = 1
FinSeg = NoOfSegs END IF FOR SegNo = BegmSeg TO FinSeg
IF FinlSgs(SegNo) .WchLine = LineNo THEN SumWarpDisp.x = 0 SumWarpDisp.y = 0 SumWarpDisp.Z = 0 SeglnfLstlndx = 0
SegDist' = AllProp.PropA * TempSegs(SegNo) .ADist AllProp.PropB * TempSegs(SegNo) .BDist AllProp.PropC * TempSegs(SegNo) CDist AllProp.PropD * TempSegs(SegNo) DDist
StartPt = FinlSgs(SegNo) .Beg EndPt = FinlSgs(SegNo) .Fin Grp = FinlSgs(SegNo) .WchGrp
find if seg has warp info and wch seginfolst it is (m)
IF FinlSgs(SegNo) .WchlnfoArr <> 0 THEN FOR = 1 TO AvlInfArr
IF Seglnfo(m) .WchSeg = SegNo THEN SeglnfLstlndx = SeglnfLstlndx + 1 SeglnfoLst(SeglnfLstlndx) =
END IF NEXT ' (end of seg info) END IF
SegPtNo = 0
IF GetObjDispVals = True THEN
BegmPt = AncPt
FinPt = AncPt ELSE
BeginPt = StartPt
FinPt = EndPt END IF
FOR PtNo = BeginPt TO FinPt
IF GetObjDispVals = False THEN
TempLmeBegFmlndex = TempLineBegFinlndex • IF IntermitLine = True THEN
Conversion' = 1 / ALns(LineNo) .Threshold SELECT CASE ALns(LineNo) .KeyForm CASE 1
RevisedPropA1 = (AllProp.PropA -
ALns(LineNo) .Threshold) *Conversιon' RevisedPropB! =
AllProp.PropB * Conversion' RevisedPropC' =
AllProp.PropC * Conversion' RevisedPropD! =
AllProp.PropD * Conversion' CASE 2
RevisedPropB' = (AllProp.PropB - ALns(LineNo) .Threshold) *Conversιon' RevisedPropA! =
AllProp.PropA * Conversion' RevisedPropC! =
AllProp.PropC * Conversion! RevisedPropD! =
AllProp.PropD * Conversion! CASE 3
RevisedPropC! =
(AllProp.PropC -
ALns(LineNo) .Threshold) 'Conversion' RevisedPropB! =
AllProp.PropB * Conversion' RevisedPropA! =
AllProp.PropA * Conversion' RevisedPropD' =
AllProp.PropD * Conversion! CASE 4
RevisedPropD! = (AllProp.PropD -
ALns(LineNo) .Threshold) 'Conversion' RevisedPropB! =
AllProp.PropB * Conversion' RevisedPropC! =
AllProp.PropC * Conversion! RevisedPropA! =
AllProp.PropA * Conversion!
END SELECT
'adjust so props total 1
SumProp' = RevisedPropA! + RevisedPropB' +
RevisedPropC + RevisedPropD' Mkl! = 1 / SumProp! AllProp.PropA = RevisedPropA' * Mkl' AllProp.PropB = RevisedPropB' * Mkl' AllProp.PropC = RevisedPropC * Mkl' AllProp.PropD = RevisedPropD' * Mkl' END IF
AllSumdPt.x = AllProp.PropA *
GetAReal! (APtsXPg, PtNo) +
AllProp.PropB *
GetAReal! (BPtsXPg, PtNo) +
AllProp.PropC *
GetAReal! (CPtsXPg, PtNo) +
AllProp.PropD *
GetAReal! (DPtsXPg, PtNo) +
D s .x
AllSumdPt.y = AllProp.PropA *
GetAReal! (APtsYPg, PtNo) +
AllP op.PropB *
GetAReal! (BPtsYPg, PtNo) +
AllProp.PropC *
GetAReal1 (CPtsYPg, PtNo) +
AllProp.PropD *
GetAReal! (DPtsYPg, PtNo) +
Disp.y AllSumdPt Z = AllProp.PropA *
GetAReal' (APtsZPg, PtNo) +
AllProp.PropB *
GetAReal' (BPtsZPg, PtNo) +
AllProp.PropC *
GetAReal' (CPtsZPg, PtNo) +
AllProp.PropD *
GetAReal' (DPtsZPg, PtNo) +
Disp.Z
IF FinlSgs(SegNo) .WchlnfoArr <> 0 THEN SegPtNo = PtNo - BeginPt + 1 GetSumWarpDisp SeglnfoLst() , SeglnfLstlndx, FrameNo, SegNo, SegPtNo, SumWarpDisp
AllSumdPt.x = AllSumdPt.x + SumWarpDisp.x AllSumdPt.y = AllSumdPt.y + SumWarpDisp.y AllSumdPt.Z = AllSumdPt.Z + SumWarpDisp.Z END IF
IF AncRun = False OR
(AncRun = True AND Second = 2) THEN SaveLinelndex = SaveLinelndex + 1
'index for complete line (each pt of each seg of the line is added to this) SetArrayReal FastWorkArraylXPg, SaveLinelndex, Ob PathPosit.x - (PFac1 * (AllSumdPt.x - Ob PathPosit.x)) SetArrayReal FastWorkArraylYPg, SaveLinelndex, ObjPathPosit.y - (PFac! * (AllSumdPt y - ObjP thPosit.y) ) SetArrayReal FastWorkArraylZPg, SaveLinelndex, ObjPathPosit.Z - (PFac' * (AllSumdPt.Z - ObjPathPosit.Z)) SetA FastWorkArraylXPg, 0, SaveLinelndex
'record pts of line without path position and perspective, so when saved appears in subsequent runs as first drawn
IF SaveThisRun = True AND FrameNo = F ishFrame THEN SaveWhllmglndex = SaveWhllmglndex + 1 SetArrayReal TempPtsXPg, SaveWhllmglndex,
AllSumdPt.x - Disp.x SetArrayReal TempPtsYPg, SaveWhllmglndex,
AllSumdPt y - Disp.y SetArrayReal TeπpPtsZPg, SaveWhllmglndex,
AllSumdPt.Z - Disp.Z SetA TempPtsXPg, 0, SaveWhllmglndex END IF END IF
IF GetObjDispVals = True THEN
PtVal.x = ObjPathPosit.x - (PFaC *
(AllSumdPt.x - ObjPathPosit.x))
PtVal.y = ObjPathPosit y - (PFac *
(AllSumdPt y - ObjPathPosit.y))
PtVal.Z = ObjPathPosit.Z - (PFaC * (AllSumdPt.Z - ObjPathPosit.Z))
IF FrameNo = FirstAncFrm THEN
StaticAncVal.x = PtVal.x StaticAncVal.y = PtVal.y StaticAncVal.Z = PtVal.Z
END IF
AncDisp.x = StaticAncVal.x - PtVal.x AncDisp.y = StaticAncVal.y - PtVal.y AncDisp.Z = StaticAncVal Z - PtVal.Z
END IF
FOR q = 1 TO NoOfVelcros
IF VelcroAGrp(q) .HookPtlndex = PtNo AND GetObjDispVals = False THEN VelcroAGrp( ) .HookXYZVals.x = GetAReal' (FastWorkArraylXPg, SaveLinelndex) VelcroAGrp(q) HookXYZVals.y = GetAReal' (FastWorkArraylYPg, SaveLinelndex) VelcroAGrp(q) .HookXYZVals.Z = GetAReal' (FastWorkArraylZPg, SaveLinelndex) END IF NEXT NEXT 'point along the seg END IF 'the seg belongs to the line NEXT 'seg
IF GetObjDispVals = False THEN
SaveLinelndex = 0 'reset se ifinalpts index to 0
TrnsfrWhlArray FastWorkArraylXPg, FastWorkArray2XPg
LineCol = ALns(LineNo) .LineCol PaintCol = ALns(LineNo) -PaintCol
IF Records = "No" THEN DrawArray
FastWorkArray2XPg, -1, True IF Records = "RecordS4" THEN SCREEN 9, , 0, 1 EyeDiff! = GetAReal! (FastWorkArray2ZPg, 1) /
ZDivisor XPt = GetAReal' (FastWorkArray2XPg, 1) - EyeDiff YPt = GetAReal! (FastWorkArray2YPg, 1) PSET (XPt, YPt) , 1
FOR J = 2 TO GetA(FastWorkArray2XPg, 0) EyeDiff = GetAReal' (Fas WorkArray2ZPg, j) / ZDivisor XPt = GetAReal! (FastWorkArray2XPg, J) - EyeDiff! YPt = GetAReal! (FastWorkArray2YPg, J) LINE -(XPt, YPt) , 1 NEXT
SCREEN 9, , 1, 0
EyeDiff! = GetAReal! (FastWorkArray2ZPg, 1) /
ZDivisor XPt = GetAReal! (FastWorkArray2XPg, 1) + EyeDiff! YPt = GetAReal! (FastWorkArray2YPg, 1) PSET (XPt, YPt) , 1 FOR J = 2 TO GetA(FastWorkArray2XPg, 0)
EyeDiff! = GetAReal! (FastWorkArray2ZPg, J) /
ZDivisor XPt = GetAReal! (FastWorkArray2XPg, J) + EyeDiff! YPt = GetAReal! (FastWorkArray2YPg, J) LINE -(XPt, YPt) , 1 NEXT END IF
IF ALns(LineNo) .Looped = 0 THEN 'not a loop IF RecordS = "RecordSβ" THEN
WriteXFerlnfo eStartEntity + eNonLooped + eNonFilled, 0, 0, 0, 0 WriteXFerlnfo eSetLineWidth, 1, 0, 0, 0 WriteXFerlnfo eSetMix, 0, 0, 0, 0 WriteXFerlnfo eSetColor, ALns(LineNo) .LineCol,
0, 0, 0 WriteXFerlnfo ePointAt, 0,
GetAReal! (FastWorkArray2XPg, 1) - 320,
GetAReal! (FastWorkArray2YPg, 1) - 175,
-GetAReal! (FastWorkArray2ZPg, 1) + 1200)
FOR J = 10 TO GetA(FastWorkArray2XPg, 0) STEP 10
WriteXFerlnfo eLineTo, 0,
GetAReal! (FastWorkArray2XPg, J) - 320, GetAReal! (FastWorkArray2YPg, J) - 175, -GetAReal! (Fas WorkArray2ZPg, J) + 1200) NEXT 'non closed line is finished J = GetA(FastWorkArray2XPg, 0) IF J MOD 10 <> 0 THEN
WriteXFerlnfo eLineTo, 0,
GetAReal! (FastWorkArray2XPg, GetAReal! (FastWorkArray2YPg, -GetAReal! (FastWorkArray2ZPg,
Figure imgf000099_0001
END IF END IF 'if not a loop
IF ALns(LineNo) .Looped > 0 THEN 'line is a loop IF RecordS = "RecordS6" THEN
IF PaintCol <> -1 THEN 'paint col -1 is flag for no fill WriteXFerlnfo eStartEntity + eLooped + eFilled, ALns(LineNo) .PaintCol, 0, 0, 0 ELSE
WriteXFerlnfo eStartEntity + eLooped, 0, 0, 0, 0 END IF
WriteXFerlnfo eSetLineWidth, 1, 0, 0, 0 WriteXFerlnfo eSetMix, 0, 0, 0, 0 WriteXFerlnfo eSetColor, ALns(LineNo) .LineCol, 0, 0, 0 WriteXFerlnfo ePointAt, 0,
GetAReal' (FastWorkArray2XPg, GetAReal' (FastWorkArray2YPg, -GetAReal' (FastWorkArray2ZPg, FOR J = 10 TO GetA(FastWorkArray2 10 WriteXFerlnfo eLineTo, 0,
GetAReal' (FastWorkArray2XPg, GetAReal' (FastWorkArray2YPg, -GetAReal' (FastWorkArray2ZPg, NEXT WriteXFerlnfo eLineTo, 0,
GetAReal' (FastWorkArray2XPg, GetAReal1 (FastWorkArray2YPg, -GetAReal' (FastWorkArray2ZPg,
Figure imgf000100_0002
END IF 'if records=S6
Figure imgf000100_0001
END IF 'IF GetObjDispVals = False END IF 'if Threshold ok
END IF 'if line belongs to object
ALns(LineNo) TeπpFm = TempL eBegFmlndex NEXT ' line END IF 'if grp belongs to object NEXT 'Group NEXT 'Pass IF FrameNo > FmishFrame - 6 THEN
IF ObjNo = 1 THEN ObjF alPositions(FmishFrame - FrameNo)
F alPositObjl = ObjPathPosit IF ObjNo = 2 THEN ObjFmalPositions(FmishFrame - FrameNo)
FιnalPosιtObj2 = ObjPathPosit IF ObjNo = 3 THEN ObjFmalPositions(FmishFrame - FrameNo) FmalPosιtObj3 = ObjPathPosit END IF END IF 'if visible NEXT 'object
IF OneFrameOnly = True THEN GOTO Skιp2 IF RecordS = "No" THEN COLOR 5
LOCATE 1 1 PRINT RecordFrameNo SWAP apage, vpage SCREEN 9 , apage, vpage CLS END IF
IF Records = "RecordS4" THEN SCREEN 9, , 0, 1
LOCATE 1, 1 PRINT SnapNameS, RecordFrameNo SCREEN 9, , 1, 0
LOCATE 1, 1 PRINT SnapNameS, RecordFrameNo Snapshot ASC(LEFTS(SnapNameS, 1) ) * 256 +
ASC(RIGHTS(SnapNameS, 1) ) , RecordFrameNo SCREEN 9, , 1, 0 CLS
SCREEN 9, , 0, 1 CLS END IF
ALns(l) .Beg = 1. ALns(l) .Fin = ALnsd) TempFin FOR I = 2 TO NoOfLmes
ALns(I).Beg = ALnsd - 1) .Fm + 1
ALnsd) .F = ALnsd) .Beg + ALns(I) .TeirpFin - 1
NEXT IF SaveThisRun = True AND FrameNo = FmishFrame THEN BEEP OPEN "k
Figure imgf000101_0001
+ RunNameS + ".TWS" FOR
BINARY AS #1 EndOfPts = GetA(TempPtsXPg, 0) PUT #1, , EndOfPts FOR I = 1 TO EndOfPts
XVal' = GetAReal' (TempPtsXPg, I)
YVal' = GetAReal' (TempPtsYPg, I)
ZVal' = GetAReal! (TempPtsZPg, I)
PUT #1, , XVal'
PUT #1, , YVal' ,
PUT #1, , ZVal' NEXT
SCREEN 9, , 0, 0
CLS
PRINT "recorded array"
DrawPartialArray TempPtsXPg, 1, GetA(TeπpPtsXPg, 0), -1, False
SLEEP 1
SCREEN 9, , apage, vpage
PUT #1, , NoOfLines
FOR I = 1 TO NoOfLmes
PUT #1, , ALnsd) NEXT
PUT #1, , NoOfGroups FOR I = 1 TO NoOfGroups
PUT #1, , Group(I) NEXT
PUT #1, , NoOfObjects FOR I = 1 TO NoOfObjects
PUT #1, , Object(I) NEXT FOR I = 1 TO NoOfObjects
PUT #1, , AObjCnt (I) NEXT FOR I = 1 TO 5
PUT #1, , ObjFmalPositions(I) NEXT
PUT #1, , RecordFrameNo CLOSE #1 END IF
Skιp2:
NEXT 'FrameNo
COLOR 5
IF OneFrameOnly = True THEN GOTO OneFrameOnlySkip
SCREEN 9, , 0, 0
COLOR 5
LOCATE 10, 1: PRINT RunNameS, RecordFrameNo
IF RecordS = "No" THEN LOCATE 11, 1: PRINT "NOT RECORDED!"
SCREEN 9, , 1, 1
COLOR 5
LOCATE 10, 1 PRINT RunNameS, RecordFrameNo
IF RecordS = "No" THEN LOCATE 11, 1: PRINT "NOT RECORDED'"
COLOR 5
IF Records = "Records6" THEN
CLOSE #2
PRINT "closed S6" END IF IF ConfirmOSee Again'") THEN
IF Confirm("Make Adjustments'") THEN
SELECT CASE UserChoice("Adjust What'', "" "Vislnvis'
"IntermitLn" , "", "") CASE 2 MrkVisInvisL e CASE 3 MrklntermtLine END SELECT END IF
GOTO StartOver END IF
OneFrameOnlySkip COLOR 5
END SUB
SUB CrsrOn
PUT (10, 10), LCrsr PUT (20, 10), RCrsr
LastMrkrPts.lx = 10 LastCrsPos.rx = 10 LastCrsPos y = 0
LastCrsPos lx = 10 LastCrsPos.rx = 20 LastCrsPos y = 10
END SUB
SUB D3Wave (RequiredLengthOfWave) CLS
WaveRefOK = False WHILE NOT WaveRefOK DO CLS DefnPt WaveRefStart, "Mrk Start Of Wave Reference Line
(Must Be Longer Than Wave To Be Drawn) ' "Defn≤tartWaveRefLine", 3
SetArrayReal FastWorkArraylXPg, 1, XYZ.x SetArrayReal FastWorkArraylYPg, 1, XYZ.y SetArrayReal FastWorkArraylZPg, 1, XYZ.Z
DefnPt WaveRefEnd, "Mrk End Of Wave Reference Line", "DefnEndWaveRefLme", 3
SetArrayReal FastWorkArraylXPg, RequiredLengthOfWave, XYZ.x
SetArrayReal FastWorkArraylYPg, RequiredLengthOfWave, XYZ y
SetArrayReal FastWorkArraylZPg, RequiredLengthOfWave, XYZ.Z SetA FastWorkArraylXPg, 0, RequiredLengthOfWave
Interpo FastWorkArraylXPg, 1, RequiredLengthOfWave
DrawPartialArray FastWorkArraylXPg, 1, RequiredLengthOfWave, -1, True LOOP UNTIL Confirm*"Ref Line OK'") DO
MkUniPath "Wave ", eWaveShape LOOP UNTIL ConfirmroK'")
PRINT "Required Length", RequiredLengthOfWave
PRINT "Length=", GetA(TempPtsXPg, 0)
SLEEP 3
IF RequiredLengthOfWave <= GetA(TempPtsXPg, 0) THEN
WaveRefOK = True ELSE
LOCATE 2, 30 PRINT "Wave Too Short, ReDo " SLEEP 2
CLS END IF WEND
PRINT "Figuring istart = 1 jstart = 1 wave is temppts( ), reflme is workarrayl(l) FOR J = 1 TO GetA(TempPtsXPg, 0) 'travels along wave PrevDis ' = 0 K = 0
FOR I = istart TO RequiredLengthOfWave 'travels along reflme K = K + 1
ThisDis ' = DιstBet2Pts' (FastWorkArraylXPg, TempPtsXPg, I, J) IF K > 1 AND PrevDist' < ThisDist' THEN SetArrayReal FastWorkArray2XPg, J,
GetAReal' (FastWorkArraylXPg, I - 1) - GetAReal' (TempPtsXPg, J) SetArrayReal FastWorkArray2YPg, J,
GetAReal' (FastWorkArraylYPg, I - 1) - GetAReal' (TempPtsYPg, J) SetArrayReal FastWorkArray2ZPg, J,
GetAReal' (FastWorkArraylZPg, I - 1) - GetAReal' (TempPtsZPg, J) LINE (J + 10, 136 + GetAReal' (FastWorkArray2YPg, J))-
(J + 10, 137 + GetAReal' (FastWorkArray2YPg, J) ) istart = 1 - 2
EXIT FOR END IF
PrevDist' = ThisDist' NEXT NEXT SLEEP 1
SetA FastWorkArray2XPg, 0, RequiredLengthOfWave 'main program puts FastWorkArray2XPg into JAPtsXPg etc END SUB
SUB DefnGrpsObjs
DO WHILE GroupsDefnd = False
ShortCutGroups
IF GroupsDefnd = True THEN EXIT DO
IdentGroups LOOP WHILE GroupsNamed = False
NameGroups WEND DO WHILE ObjectsDefnd = False
ShortCutOb ects
IF ObjectsDefnd = True THEN EXIT DO
IdentObjects LOOP WHILE ObjectsNamed = False
NameObjects WEND FOR I = 1 TO NoOfObjects
Object(I) .StartVis = 1
Object(I) .EndVis = NoOfFrames NEXT FOR I = 1 TO NoOfObjects
ShowObj I, 1 NEXT END SUB SUB DefnObjCntrs
FOR I = 1 TO NoOfObjects
IF LinkingToPreviousRun = True THEN
FirstPoseToMark = 2
DrawPartialArray APtsXPg, 1, GetA(APtsXPg, 0), -1, False
XYZ = AObjCntr(I) : Mrk 2, 1
LOCATE 2, 30
PRINT "Note Handle Posit (Triangle) In This
Object In Previous Run. (Press Any Key) "
SLEEP
LOCATE 2, 30- PRINT SPACES(79) ELSE
FirstPoseToMark = 1 END IF FOR Pose = FirstPoseToMark TO 4
IF FirstPoseToMark = 1 THEN CLS
ShowOb ectSegs I, Pose, -1, True
FS = "Click On A Point To Use As A Handle For <" +
CHR$(Pose + 64) + "> Source Pose of + Object(I) .Label + " OBJECT"
MrkObjCntr FS, Pose, I NEXT
ReCntrOb I, BPtsXPg, BObjCntrO ReCntrObj I, CPtsXPg, CObjCntrO ReCntrObj I, DPtsXPg, DObjCntrO
CLS
FOR J = 1 TO 4
LOCATE 3, 1 PRINT "Pose", J, "Of ", Object(I) .Label; " OBJECT" ShowObjectSegs I, J, -1, True SLEEP 1 CLS NEXT NEXT
IF NoOfGroups > 1 THEN FOR I = 1 TO NoOfGroups FOR Pose = 1 TO 4 CLS
ShowGrp Pose, I, -1 F$ = "Click On A Point To Use As A Handle For <" +
CHR$(Pose+64) + "> Source Pose of " + Group(I) Label + " GROUP" MrkGrpCntr F$, Pose, I NEXT
BPtsXPg, BGrpCntrO CPtsXPg, CGrpCntrO DPtsXPg, DGrpCntr
SUB DefnPt (DefndPoint AS t3DPoιnt, MessageS, PtIsForS, WchMrkr)
IF PtIsForS = "DefnScaffoldPts" OR PtIsForS = "MarkSpaceRefPts" THEN
C$ = "Done" ELSE CS = "x" WndChs "", "x", "x", CS, "x", "x" , AnsS, 1 LOCATE 2, 1: PRINT MessageS Finished = False DO Wndln ShowCrsr
IF INP(889> < 128 THEN DefndPoint = XYZ Mrk WchMrkr, 1 MyDelay 1 Finished = True END IF
IF PtIsForS = "DefnScaffoldPts" OR PtIsForS = "MarkSpaceRefPts" THEN IF XYZ.y < 15 THEN WndSlct AnsS, 0
IF AnsS = CS THEN MyDelay 1: EXIT DO END IF END IF
IF Finished = True THEN EXIT DO LOOP
LOCATE 2, 1: PRINT SPACES(79) END SUB
SUB DefnSegWarp (WarpNumber, AvlPth, AvlWarpProflArray)
AvlPthOnEntryToWarp = AvlPth
WaveLen = 0
SumPrev = 0
NoInSrs = 0
SegWarp = False: WaveWarp = False: UsesPrevPath = False
AllDone = False: SegOK = False
WarpNo = WarpNumber
CLS
************ what kind of warp
REDOLINK:
TextS = "Link " + Warp(WarpNumber) .Label + " To" A$ = "Wind": BS = "Iner": CS = "Time": DS = "Wave" WndChs TextS, AS, BS, CS, DS, "x", AnsS, 0 KindS = AnsS SELECT CASE AnsS CASE AS, BS, CS
SegWarp = True: AvlPth = AvlPth + 1 AvlWarpProflArray = AvlWarpProflArray + 1 CASE DS
WaveWarp = True: WaveNo = WaveNo + 1 AvlWarpProflArray = AvlWarpProflArray + 1
'used for seg wave warp profile AS = "1": BS = "2": CS = "4": DS = "6": E$ = "8" WndChs "Wave Speed?", AS, B$, C$, DS, E$, Ans$, 0 WaveSpeed = VAL(AnsS) BS = "HeadToTail": CS = "TailToHead" WndChs "Wave Moves Which Direction On Seg?",
"x", B$, C$, "x", "x", AnsS, 0 SELECT CASE AnsS
CASE BS: DirecS = "HtoT" CASE CS: DirecS = "TtoH" END SELECT B$ = "On Seg": C$ = "OffSeg": WndChs "Wave Starts",
"x", BS, C$, "x", "x", Ans$, 0 SELECT CASE AnsS
CASE BS: 'overlap at start
B$ = "On Seg": CS = "OffSeg" : WndChs "Wave Ends "x", BS, C$, "x", "x", AnsS, 0 SELECT CASE AnsS
CASE B$: OverLap = 0 ' overlap at end CASE CS- OverLap = 1 ' no overlap at end END SELECT CASE C$: 'no overlap at start
B$ = "On Seg": CS = "OffSeg": WndChs "Wave Ends ",
"x", B$, CS, "x", "x", AnsS, 0 SELECT CASE AnsS
CASE B$: OverLap = 2 ' overlap at end CASE CS: OverLap = 3 ' no overlap at end END SELECT END SELECT 'WL is multiplied by NoFrames and Speed just before call to D3 END SELECT
•********.*.**..**** use a previous warp path or wave'
IF WarpNo > 1 THEN
IF KindS = "Time" OR KindS = "Iner" OR KindS = "Wind" THEN TextS = "Use Just Previous Warp Path? (Displacement is Between Path and Warp Handle) " IF KmdS = "Wave" THEN TextS = "Use Just Previous Wave'" IF Confirm(TextS) THEN UsesPrevPath = True AvlPth = AvlPth - 1 END IF END IF
'*****"*** show segs, place handle and choose which segs to be warped
DrawPartialArray APtsXPg, 1, FinlSgs(NoOfSegs) .Fin, -1, False
ShowAllSegStarts
IF SegWarp = True THEN
IF UsesPrevPath = False THEN TextS = "Mrk Warp Path Handle On Seg " ELSE TextS = "Mrk Warp Handle Same Place As Previous
FindMrkdPtlnAPose Hndl, TextS END IF
D$ = "Done": WndChs "Mrk Seg(s) to be Warped
"x", "x", "x", D$, "x", AnsS, 1 DO WHILE AllDone = False Wndln ShowCrsr
IF XYZ.y < 15 THEN WndSlct Ans$, 0
IF AnsS = D$ AND SegOK = True THEN AllDone = True: EXIT DO END IF
IF INP(889) < 128 THEN Foundlt = False WHILE Foundlt = False F dlnApts FoundSegPt IF Foundlt = False THEN GetWndXYZ 0 WEND
MyDelay 1
FoundSeg = FindWchFinlSg(FinlSgs0 , FoundSegPt) FOR J = 1 TO NoInSrs
IF FoundSeg = WarpSrstJ, 1) THEN
SegOK = False: LOCATE 2, 1. PRINT "Seg Mrked Already" Mrk 0, 1: MyDelay 1: LOCATE 2, 1: PRINT SPACES (30) END IF NEXT
ChoicelnSegHili = True HiLiFinlSg FoundSeg
FinlSgs(FoundSeg) .WarpNo = WarpNo SegOK = True
Length = FinlSgs(FoundSeg) .Fin - FinlSgs(FoundSeg) .Beg + 1 PreviousSumPrev = SumPrev SumPrev = SumPrev + Length
NoInSrs = NoInSrs + 1
WarpSrs(NoInSrs, 1) = FoundSeg
WarpSrs(NoInSrs, 0) = Length
AvlInfArr = AvlInfArr + 1 FinlSgs(FoundSeg) .WchlnfoArr = AvlInfArr Seglnfo(AvlInfArr) .WchSeg = FoundSeg Seglnfo(AvlInfArr) .SegLen = Length
IF SegWarp = True THEN
Seglnfo(AvlInfArr) .Hndl = Hndl
Seglnfo(AvlInfArr) .WchPath = AvlPth 'if prevpath is used this is what sets same path as
Figure imgf000107_0001
END IF
IF WaveWarp = True THEN
Seglnfo(AvlInfArr) .WchWave = WaveNo
Seglnfo(AvlInfArr) .WaveSpeed = WaveSpeed
Seglnfo(AvlInfArr) .Direc = DirecS
Seglnfo(AvlInfArr! .OverLap = OverLap 'wave starts ends on off seg
WaveLen = SumPrev END IF
'the following is common for seg and wave warps
Seglnfo(AvlInfArr) .WchProf = AvlWarpProflArray Seglnfo(AvlInfArr) .Kind = KindS
IF NoInSrs = 1 THEN Seglnfo(AvlInfArr) .ProfBeg = 1
IF NoInSrs > 1 THEN Seglnfo(AvlInfArr) .Pro Beg = PreviousSumPrev
IF NoInSrs = NoOfSegs THEN EXIT DO
DS = "Done"
WndChs "Mrk Seg(s) to be Warped ", "x", "x", "x" , DS, "x' , AnsS, 1 END IF 'button pushed LOOP
IF SegWarp = True THEN ' (warp is not a wave warp) SyncPtlndexAtStartOfWarp = SyncPtlndex IF UsesPrevPath = False THEN draw path for handle DO
PathOk = False
PathError = False
DO WHILE PathOk = False
MkUniPath "Segment Warp ", eWarpPath IF Confirm!"OK?") THEN
PathOk = True ELSE
DrawArray TempPtsXPg, 0, True END F LOOP
IF LnEndsClose(TeπpPtsXPg, 1, GetA(TempPtsXPg, 0), 20) THEN IF Confir ("Mk Cycle?") THEN DrawArray TeπpPtsXPg, 0, False SmoothJoin TempPtsXPg, 30 DrawArray TeπpPtsXPg, -1, False END IF END IF ******* time warp
IF KindS = "Time" THEN I = WarpNumber CLS DrawPartialArray TeπpPtsXPg, 1, GetA(TempPtsXPg, 0), -1, False
SELECT CASE UserChoice("Use Warp Path Sync Pts?", "", "On Path", "OnFrmChrt", "No", "") CASE 2 'on path
PlaceSyncPtsOnTempPath 3, I, " Warp " +
Warp(WarpNumber) .Label SortSyncPtsForApplic 3, I SwapSortedSyncPts
CASE 3 'on frm chrt
ShowSyncPtLines SyncPtlndexAtStartOfWarp PlaceSyncPtsOnFrmChrt 3, I, " Warp " +
Warp(WarpNumber) .Label SortSyncPtsForApplic 3, I SwapSortedSyncPts
DrawArray TeπpPtsXPg, -1, False PlaceFrmChrtSyncPtsOnPath 3, I CASE 4
SortSyncPtsForApplic 3, I SortedSyncPts(1) .Frame = 1 SortedSyncPts(1) .TempPtslndex = 1 SortedSyncPts(2) .Frame = NoOfFrames SortedSyncPts(2) .TempPtslndex = GetA(TeπpPtsXPg, 0) END SELECT RedoVelGraphForWarp:
TextS = "Velocity Graph For Movement Of Warp Handle Along
Warp Path" DoVelocityGraph TeπpPtsXPg, RawPtsXPg, TextS END IF LOOP WHILE PathError = True
...**.*.*«*.**...** ^£ inertia warp then get accelerations Redolner: IF KindS = "Iner" THEN 'have to smooth velocities for a smooth curve ,******* derlve acceleration and find max accel CLS
FOR I = 1 TO NoOfFrames
SetArrayReal FastWorkArraylXPg, I, FrmToFrmVelocity! (I! * 100 NEXT SetArrayReal FastWorkArraylXPg, 0, NoOfFrames
SetArrayReal FastWorkArraylXPg, 1, GetAReal! (FastWorkArraylXPg, 2) SetArrayReal FastWorkArraylXPg, 0, GetAReal! (FastWorkArraylXPg, 2)
FOR I = 1 TO NoOfFrames
LOCATE 2, 1: PRINT "original frm to frm vel * 100"; I
LINE (I, 150)-(I, 150 + GetAReal! (FastWorkArraylXPg, I)), 10 NEXT SLEEP FOR I = 1 TO NoOfFrames
FrmToFrmAccel' = GetAReal! (FastWorkArraylXPg, I) - GetAReal! (FastWorkArraylXPg, I - 1)
SetArrayReal FastWorkArray2XPg, I, FrmToFrmAccel! NEXT SetArrayReal FastWorkArray2XPg, 1, GetAReal! (FastWorkArray2XPg, 2)
FOR I = 1 TO NoOfFrames
LOCATE 2, 1: PRINT "raw frm to frm accel"; I
LINE (I, 150)-(I, 150 + GetAReal! (FastWorkArray2XPg,I) *4) , 11 NEXT SLEEP
SetArrayReal FastWorkArray2XPg, 0, NoOfFrames
Smooth FastWorkArray2XPg, FastWorkArraylXPg, 2, False
Smooth FastWorkArraylXPg, FastWorkArray2XPg, 2, False
Smooth FastWorkArray2XPg, FastWorkArraylXPg, 2, False
Smooth FastWorkArraylXPg, FastWorkArray2XPg, 2, False
FOR I = 1 TO NoOfFrames
LOCATE 2, 1: PRINT "smoothed frm to frm accel"; I
LINE (I, 150)-(I, 150 + GetAReal! (FastWorkArray2XPg, I) * 4),13
NEXT
SLEEP
FOR I = 1 TO NoOfFrames
IF MaxAccel! < GetAReal! (FastWorkArray2XPg, I) THEN
MaxAccel! = GetAReal! (FastWorkArray2XPg, I) NEXT
'******* use half of inertia warp path becuz shift index 'goes pos or neg, so total excursion = len of warp path
' ! ! warp path shld be smoothed, becuz accel controls position on it, not some other velocity
Smooth TempPtsXPg, FastWorkArraylXPg, 5, False Smooth FastWorkArraylXPg, TempPtsXPg, 5, False HalfOfWarpPath' = GetA(TempPtsXPg, 0) / 2
FOR q = 1 TO NoOfFrames
PercentOfMaxAccel' = GetAReal' (FastWorkArray2XPg, q) / MaxAccel'
******** set Shiftlndex for each frame as a percentage of 'the length of half the Warp Path (which is in temppts)
'Shiftlndex' = PercentOfMaxAccel' * HalfOfWarpPath1
Friction' = .75. Flexibility = 15
NewAccel' = NewAccel' - POSIT' / Flexibility +
GetAReal' (FastWorkArray2XPg, q) IF POSIT' > 0 THEN FπctionEffeet' = Friction' IF POSIT' < 0 THEN FrictionEffeet' = -Friction' POSIT' = POSIT' + NewAccel' - FrictionE feet' Shiftlndex' = POSIT'
shift = CINT(Shiftlndex' ) LOCATE 2, 1 PRINT "shift"; q LINE (q, 150)-!q, 150 + shift), 15
'******* when accel is 0 the position on the warp path is 'half way along it so it can swing pos or neg:
FinalTempPtsIndex = HalfOfWarpPath' + Shiftlndex1
IF FinalTempPtsIndex < 1 THEN FinalTempPtsIndex = 1 IF FinalTempPtsIndex > GetA(TempPtsXPg, 0) THEN
FinalTempPtsIndex = GetA(TempPtsXPg, 0)
SetArrayReal RawPtsXPg, q,
GetAReal' (TeπpPtsXPg, FinalTempPtsIndex) SetArrayReal RawPtsYPg, q,
GetAReal1 (TempPtsYPg, FinalTempPtsIndex) SetArrayReal RawPtsZPg, q,
GetAReal' (TempPtsZPg, FinalTempPtsIndex)
CIRCLE (GetAReal' (RawPtsXPg,q) , GetAReal! (RawPtsYPg,q) ) , 3, 10 NEXT SetA RawPtsXPg, 0, NoOfFrames
SLEEP END IF
RedoAirF:
IF KindS = "Wind" THEN
'*****"* find max wind velocity
FOR P = 1 TO NoOfFrames
IF MaxWindVel1 < FrmToFrmVelocity' (P) THEN
MaxWindVel' = FrmToFrmVelocity' (P)
IF MaxWindVel' = 0 THEN MaxWindVel' = .01 NEXT
********* get wind velocity for each frame as a percentage of max velocity
FOR q = 1 TO NoOfFrames
PercentMaxFrmVel' = FrmToFrmVelocity' (q) / MaxWindVel'
******** set Shiftlndex for each frame as a percentage of 'the length of the Wind Warp Path (which is in temppts)
Shiftlndex' = PercentMaxFrmVel' * GetA(TempPtsXPg, 0) IF Shiftlndex' > GetA(TempPtsXPg, 0) THEN Shiftlndex' =
GetA(TempPtsXPg, 0) IF Shiftlndex' < 1 THEN Shiftlndex' = 1
SetArrayReal RawPtsXPg, q, GetAReal' (TempPtsXPg,
CINT(Shiftlndex' ) ) NEXT
SetA RawPtsXPg, 0, NoOfFrames Smooth RawPtsXPg, TempPtsXPg, 3, False FOR q = 1 TO NoOfFrames
CIRCLE (GetAReal' (TeπpPtsXPg,q) , GetAReal' (TempPtsYPg,q) ) 3,10 NEXT END IF
IF NOT Confir ("OK'") THEN
IF KindS = "Iner" THEN GOTO Redolner IF KindS = "AirF" THEN GOTO RedoAirF IF KindS = "Time" GOTO RedoVelGraphForWarp END IF END IF 'if uses prevpath END IF
IF WaveWarp = True AND UsesPrevPath = False THEN FOR I = 1 TO NoInSrs
TotalSegsLen = TotalSegsLen + WarpSrs(I, 0) NEXT SELECT CASE OverLap
CASE 0: WL = 2 * Length * WaveSpeed 'ol at start ol at end
CASE 1. WL = Length * WaveSpeed 'ol at start no ol at end
CASE 2. WL = Length * WaveSpeed 'no ol at start ol at end
CASE 3. WL = Length * WaveSpeed 'no ol at start no ol at end
'WL is needed length of wave
END SELECT
D3Wave WL END IF CLS main program now puts RawPts into avlpath ' if a v.-ave warp main program now puts FastWorkArray2XPg into JAPtsXPg etc. END SUB
SUB DelLast (WchPose)
IF WchPose = 1 THEN DelLastLnPart2 ALnsO , APtsXPg, WchPose IF WchPose 2 THEN DelLastLnPart2 BLns() BPtsXPg, WchPose IF WchPose 3 THEN DelLastLnPart2 CLns() CPtsXPg, WchPose IF WchPose 4 THEN DelLastLnPart2 DLns() , DPtsXPg, WchPose END SUB
SUB DelLastLnPart2 (LnArrayO AS LineType PtArray, WchPose)
Start = LnArray(LnNo) .Beg start of last line
Finish = LnArraytLnNo) .Fin 'end
DrawPartialArray PtArray, Start, Finish, 0, True
LnNo = LnNo - 1
IF LnNo > 0 THEN ShowGuideLn WchPose
SetA APtsXPg + 3 * (WchPose - 1), 0, LnArray(LnNo) .Fin
SetA RawPtsXPg, 0, 0
IF WchPose = 1 THEN
NoOfLmes = NoOfLmes - 1
ALns(O) .Beg = NoOfLines END IF END SUB
FUNCTION DιstBet2Pts' (aArrayl, aArray2, aPointlndexl aPomtIndex2) dx = GetAReal(aArrayl 0, aPointlndexl)
GetAReal(aArray2 0, aPomtIndex2)
DY' = GetAReal(aArrayl 1, aPointlndexl)
GetAReal(aArray2 1, aPomtIndex2)
DZ' = GetAReal(aArrayl 2, aPointlndexl)
GetAReal(aArray2 aPomtIndex2)
DιstBet2Pts' = SQR(dx' dxi + DY' * DY' -i DZ ' DZ ' )
END FUNCTION
FUNCTION DistToNextPoint ' (aArray, aPo tlndex) dx' GetAReal(aArray + aPointIndex) - GetAReal(aArray + aPomtlndex + 1)
DY' GetAReal(aArray + aPomtlndex) - GetAReal(aArray + aPomtlndex + 1)
DZ' GetAReal(aArray + aPomtlndex) - GetAReal(aArray + aPoin Index + 1)
DistToNextPoint' = SQRtdx * dx' + DY' * DY' DZ ' DZ ' )
END FUNCTION
SUB DoVelocityGraph (aDrawnPath , aFramePosArray, TextS )
ErsMnu
GetVelGraphFro Path (aDrawnPath)
Done = False
DO WHILE Done = False
CalcFramePositions aDrawnPath, aFramePosArray
IF PathError = True THEN EXIT DO
DrawVelGraph aDrawnPath, aFramePosArray
LOCATE 3, 1 PRINT "FAST"
LOCATE 3, 1 PRINT TextS
LOCATE 4, 39 PRINT "Use REVISE To Enable Sync Pts"
SELECT CASE UserChoice("" , "", "OK To Try", "Revise', '") CASE 2 Done = True CASE 3 GetVelGraphFromUser (aDrawnPath)
END SELECT LOOP END SUB
SUB Draw3DLιne (aPointl AS t3DPoιnt, aPomt2 AS t3DPoιnt, aColor AS INTEGER) - I l l -
LX1 = CINT ( aPointl . - aPointl . Z / ZDivisor)
LX2 = CINT (aPomt2 . x - aPoint2 . Z / ZDivisor)
RX1 = CINT <aPomtl . x + aPointl . Z / ZDivisor)
RX2 = CINT (aPomt2 . x + aPoιnt2 . Z / ZDivisor )
IF aColor = -1 THEN
IF LX1 = RX1 AND LX2 = RX2 THEN
LINE (LX1, aPointl.y)-(LX2, aPoint2.y), 13 ELSE
LINE (LX1, aPomtl.y)-(LX2, aPomt2.y), LCol LINE (RX1, aPomtl.y)-(RX2, aPomt2.y), RCol END IF ELSE
LINE (LX1, aPointl.y)-(LX2, aPoint2.y), aColor LINE (RX1, aPointl.y)-(RX2, aPoint2.y), aColor END IF END SUB
' Draw a three-D point on the screen : Color -1 indicates anaglyph
SUB Draw3DPoιnt (aPoint AS t3DPomt, aColor AS INTEGER) lx = CINT(aPoint.x - aPoint.Z / ZDivisor) rx = CINT(aPoιnt.x + aPoint.Z / ZDivisor)
IF aColor = -1 THEN IF lx = rx THEN
PSET (lx, aPoint.y), 13 ELSE
PSET (lx, aPoint.y), LCol PSET (rx, aPoint.y), RCol END IF ELSE
PSET dx, aPoint.y), aColor PSET (rx, aPoint.y), aColor END IF END SUB
SUB DrawAPose
CLS
LineColor = 1 'Default color to start
Drawlmg 1
END SUB
SUB DrawArray (aArray, aColor, aUseLines)
DrawPartialArray aArray, 1, GetA(aArray, 0), aColor, aUseLines
END SUB
SUB DrawBCDPoses WHILE DrawBPoseOK = False CLS
LINE (10, 29)-(630, 340), 5, B IF Scaffold = True THEN MrkScaffoldCntr "Mark Scaffold Center For B Pose", 1, 2 ShowScaffold 2 XYZ = BScaffoldCntr(1) Mrk 2, 1
ShowScaffold 1 'erases scaffold for previous pose END IF Drawlmg 2 WEND
WHILE DrawCPoseOK = False CLS
LINE (10, 29)-(630, 340), 5, B IF Scaffold = True THEN
MrkScaffoldCntr "Mark Scaffold Center For C Pose", 1, 3 ShowScaffold 3 ShowScaffold 2 XYZ = CScaffoldCntrd) Mrk 2, 1 END IF Drawlmg 3 WEND
WHILE DrawDPoseOK = False CLS
LINE (10, 29)-(630, 340), 5, B IF Scaffold = True THEN
MrkScaffoldCntr "Mark Scaffold Center For D Pose", 1, 4 ShowScaffold 4 ShowScaffold 3 XYZ = DScaffoldCntr(1) Mrk 2, 1 END IF Drawlmg 4 WEND IF DrawAPoseOK = True AND DrawBPoseOK = True AND
DrawCPoseOK = True AND DrawDPoseOK = True THEN I OK = True SELECT CASE UserChoice("", "", "", "Poses OK", "RedoPoses", "") CASE 4
Operation = 2 END SELECT END SUB
SUB Drawlmg (WchPose)
WchPoseForMag = WchPose
STATIC LinesToDraw
DIM GuideBox AS t3DPoint
DIM OldXYZ AS t3DPomt
LINE (10, 29)-(630, 340), 5, B
IF LinkingToPreviousRun = True OR ReusingPoseAOnly = True THEN
LinesToDraw = NoOfLines SetA RawPtsXPg, 0, 0: LnNo = 0: SetA TeπpPtsXPg, 0, 0 IF DeleteAllButPreviousImage = True THEN SELECT CASE WchPose
CASE 3: DrawArray APtsXPg, 0, True
IF ShowingScaffold = True THEN ShowScaffold 1
CASE 4: DrawArray APtsXPg, 0, True: DrawArray BPtsXPg, 0, True
IF ShowingScaffold = True THEN ShowScaffold 2 END SELECT END IF
PutDrwMnuOnScrn TextS, WchPose, 0
FrstLn = False: Drawing = False: I OK = False
LineStartMarked = False
IF WchPose = 1 AND LnNo = 0 THEN
LOCATE 2, 50:
IF LinkingToPreviousRun = False THEN PRINT "Line Color:"; LineColor
ELSE PRINT "Line Color-", ALns(LnNo) -LineCol END IF END IF
IF WchPose = 1 THEN LOCATE 2, 65: PRINT "Lines Avl: "; 75 - LnNo WchPoseForHili = WchPose ShowGuideLn WchPose DO
Wndln
ShowCrsr
IF XYZDiff THEN
IF INP(8B9) < 128 AND WchPose > 1 AND LinesToDraw > 0 AND
LnNo = LinesToDraw THEN LOCATE 2, 1
PRINT "Last Line Already Done" MyDelay 1 LOCATE 2, 1 PRINT SPACES(30) GOTO REDOLINEOK END IF
IF INP(889) < 128 THEN
IF Lines artMarked = False THEN
GuideBox = XYZ
Mrk 1, 1
LmeStartMarked = True
ZStartPt' = XYZ.Z END IF
Draw3DPomt XYZ, -1 ZEndP ' = XYZ.Z
IF GlueLoops = True THEN IF Index > 1 THEN
ZDisp = ZEndPt! - ZStartPt' AbsZDiεp = CINT(ABS(ZEndP ' - ZStartPt')) END IF
IF AbsZDisp > 3 THEN SOUND 30 * AbsZDisp, 1 END IF
FrstLn = True 'firstline needed to prevent accidental exit when no line is there IF Drawing = False THEN Drawing = True Index = 0 END IF
Index = Index + 1
IF XYZ.x <> 0 AND XYZ.y <> 0 THEN EnterRawPt Index END IF
IF INP(889) >= 128 AND Drawing = True THEN XYZ = GuideBox Mrk 1, 1
LmeStartMarked = False Drawing = False Smooth RawPtsXPg, TempPtsXPg, 3, True check loop closure-
IF WchPose = 1 AND (MkL eLoopS = "CnfirmEach" OR
MkLineLoopS = "Automatic") THEN IF LnEndsClose(TeπpPtsXPg, 1, GetA(TempPtsXPg, 0), 10) THEN SELECT CASE MkLineLoopS CASE "CnfirmEach"
IF Confirm("Glue Ends?") THEN
IF GetA(TempPtsXPg, 0) > 30 THEN
SmoothJoin TeπpPtsXPg, 30 ELSE
LOCATE 6, 1
PRINT "Too Small To SmoothJoin" SLEEP 1 LOCATE 6, 1 PRINT SPACES(75) ENDIF
LOCATE 2, 30: PRINT "Glued MyDelay 1
LOCATE 2, 30: PRINT SPACES(20) ALns(LnNo + 1) .Looped = 1 END IF CASE "Automatic"
IF GetA(TempPtsXPg, 0) > 30 THEN
SmoothJoin TempPtsXPg, 30 ELSE
LOCATE 6, 1
PRINT "Too Small To SmoothJoin" SLEEP 1 LOCATE 6, 1 PRINT SPACES(75) ENDIF
LOCATE 2, 30: PRINT "Glued MyDelay 1
LOCATE 2, 30: PRINT SPACES(25) ALns(LnNo + 1) .Looped = 1 END SELECT ELSE BEEP
LOCATE 2, 30: PRINT "NOT A LOOP" SLEEP 2
LOCATE 2, 30: PRINT SPACES125) END IF
DO UNTIL XYZ.y > 15
Wndln LOOP END IF IF WchPose > 1 AND ALns(LnNo + 1) .Looped = 1 THEN
IF LnEndsClose(TeπpPtsXPg, 1, GetA(TempPtsXPg, 0), 10) THEN
LOCATE 2, 30: PRINT "Glued ": MyDelay 1
IF GetA(TeπpPtsXPg, 0) > 30 THEN SmoothJoin TempPtsXPg, 30
LOCATE 2, 30: PRINT SPACE$(25) ELSE
BEEP: BEEP
LOCATE 2, 28
PRINT "NO LOOP CLOSURE, YOU MUST DELETE AND REDO"
SLEEP 2
LOCATE 2, 28: PRINT SPACES(65) END IF
END IF -end check loop closure-
LINEENTRY:
LnNo = LnNo + 1
IF Normallm = False THEN ALns(LnNo) .NormOrMag = 1 ELSE
ALns(LnNo) .NoπrOrMag = 0 ALns(LnNo) .StartVis = 1: ALns(LnNo) .EndVis = NoOfFrames PutDrwMnuOnScrn Texts, WchPose, 0 IF WchPose = 1 THEN
ALns(LnNo) .LineCol = LineColor
LinesToDraw = LnNo MagLmesToDraw = LnNo NoOfLines = LnNo ALns(0) .Beg = LnNo
END IF
SELECT CASE WchPose
GetA(TempPtsXPg, 0) GetA(TeπpPtsXPg, 0) GetA(TeπpPtsXPg, 0) GetA(TempPtsXPg, 0)
Figure imgf000117_0001
se, LnNo, 0) < LineLength(WchPose - 1, LnNo, 0) / 2 THEN
BEEP: LOCATE 2, 30: PRINT "LINE ENDED BY TRIGGER ERROR?" SLEEP 2 LOCATE 20, 1 PRINT SPACES (30) END IF IF WchPose = 1 THEN
LOCATE 2, 65: PRINT "Lines Avl: "; 75 - LnNo LOCATE 2, 50: PRINT "Line Color:"; LineColor END IF IF WchPose > 1 THEN
IF LnNo = LinesToDraw THEN
PutDrwMnuOnScrn TextS, WchPose, 1 ShowScaffold WchPose - 1 END IF END IF
TrnsfrTmpToImPartA WchPose 'transfers temppts to appropriate
PtArray (Apts, BPts,etc. ) 'and sets line info DrawArray RawPtsXPg, 0, False 'erases RawPts on screen ShowLn WchPose, LnNo, -1 'shows line IF WchPose > 1 AND NOT ReUsingPrevLine THEN
ShowLn WchPose - 1, LnNo, 0 ReUsingPrevLine = False
ShowGuideLn WchPose 'shows guideline on previous Pose
(except for A Pose shows B Pose) END IF END IF
REDOLINEOK:
IF XYZ.y < 15 THEN WndSlct AnsS, 1 SELECT CASE AnsS CASE AS
IF WchPose = 1 THEN LOCATE 4, 1: PRINT SPACES (35)
LOCATE 4, 1: INPUT "Line Name"; NameS:
ALns(LnNo) -Label = UCASES (NameS) LOCATE 4, 1: PRINT SPACES(35) ELSE
ShowScaffold WchPose ShowScaffold WchPose - 1 END IF CASE BS ' (choose line color in Pose 1; use prev line in all other Poses) IF WchPose = 1 THEN ChooseLineColor
PutDrwMnuOnScrn TextS, WchPose, 0 LOCATE 2, 50: PRINT "Line Color:"; LineColor IF WchPose = 1 THEN LOCATE 2, 65
PRINT "Lines Avl:"; 75 - LnNo END IF END IF
IF WchPose > 1 AND LnNo < LinesToDraw THEN ReUsingPrevLine = True IF WchPose = 2 THEN SourcePose = 1 'can only re-use line from Pose 1 IF WchPose > 2 THEN
TextS = "From What Pose?" AS = "A" : BS = "B" : CS = "C" SELECT CASE WchPose CASE 3
WndChs TextS, AS, B$, "x" , "x" , "x", AnsS, 0 CASE 4
WndChs TextS, AS, B$, C$, "x", "x", AnsS, 0 END SELECT SELECT CASE AnsS
CASE AS: SourcePose = 1 CASE BS: SourcePose = 2 CASE CS: SourcePose = 3 END SELECT END IF
DestinationPose = WchPose
Trnsf PrevLineToIm SourcePose, DestinationPose, LnNo + 1 PutDrwMnuOnScrn "", WchPose, 0 'as if drawn by wand FrstLn = True 'when goes to LINEENTRY
GOTO LINEENTRY: END IF
CASE CS ' (finished)
IF LnNo < LinesToDraw THEN BEEP
LOCATE 5, 1: PRINT "Not Enough Lines" MyDelay 1
LOCATE 5, 1: PRINT SPACES(16) END IF
IF FrstLn = True AND LnNo = LinesToDraw THEN FrstLn = False
IF WchPose = 1 THEN DrawAPoseOK = True IF WchPose = 2 THEN DrawBPoseOK = True IF WchPose = 3 THEN DrawCPoseOK = True IF WchPose = 4 THEN DrawDPoseOK = True END IF CASE DS ' (delete last line)
IF (Normallm = True AND ALns(LnNo) .NormOrMag = 0) OR (Normallm = False AND ALns(LnNo) .NormOrMag = 1) THEN IF LnNo > 0 THEN DelLast WchPose IF LnNo = 0 THEN FrstLn = False IF WchPose = 1 THEN
ALns(LnNo + 1) .Looped = 0 LinesToDraw = LinesToDraw - 1 MagLmesToDraw = LinesToDraw
END IF
LOCATE 2, 60: PRINT "Lines Avl ", 75 - LnNo PutDrwMnuOnScrn "" , WchPose, 0 ShowGuideLn WchPose ELSE
LOCATE 7, 1 PRINT "Can' Delete A Line Drawn In A
Different Magnification" SLEEP 2
LOCATE 7, 1 PRINT SPACES (75) END IF CASE ES ' (in Pose 1 this is intermittent line, in all others is repeat whole of A Pose for all remaining Poses) IF WchPose = 1 THEN
PRINT "will be intermittent" Intermittent = True ELSE
SELECT CASE WchPose CASE 2
Trns ATo BPtsXPg, BLns0 DrawBPoseOK = True TrnsfrATo CPtsXPg, CLns() DrawCPoseOK = True TrnsfrATo DPtsXPg, DLnsO DrawDPoseOK = True AllPosesSameAsA = True CASE 3
TrnsfrATo CPtsXPg, CLns() DrawCPoseOK = True Trns rATo DPtsXPg, DLns!) DrawDPoseOK = True CASE 4
TrnsfrATo DPtsXPg, DLns!) DrawDPoseOK = True
Figure imgf000119_0001
SUB DrawPartialArray (aArray, aStart, aFmish, aColor, aUseLines) DIM Ptl AS t3DPoιnt, Pt2 AS t3DPomt IF aFmish > aStart THEN GetArrayReal aArray + 0, aStart, Ptl.x GetArrayReal aArray + 1, aStart, Ptl.y GetArrayReal aArray + 2, aStart, Ptl.Z Draw3DPoint Ptl, aColor FOR I = aStart + 1 TO aFinish
GetArrayReal aArray + 0, I, Pt2.x GetArrayReal aArray + 1, I, Pt2.y GetArrayReal aArray + 2, I, Pt2.Z IF Pt2.x = 0 THEN
LOCATE 5, 1: PRINT "You have drawn a line in which the value of one point or more is zero" SLEEP 2: LOCATE 5, 1: PRINT SPACES(79) END IF
IF aUseLines = True THEN Draw3DLine Ptl, Pt2, aColor Ptl = Pt2 ELSE
Draw3DPoint Pt2, aColor END IF NEXT END IF END SUB
SUB DrawVelGraph (aDrawnPath, aFramePosArray)
CLS
DrawArray aDrawnPath, -1, True
FOR I = 1 TO GetA(aFramePosArray, 0)
Figure imgf000120_0001
TextPos = 5
TextLineColor = 1
FOR I - 1 TO NoOfSortedSyncPts
TextLineColor = TextLineColor + 1
IF TextLineColor = 4 THEN TextLineColor = 5
IF TextLineColor = 7 THEN TextLineColor = 15
IF TextLineColor = 9 THEN TextLineColor = 10
IF TextLineColor = 16 THEN TextLineColor = 1 x = 40 + (SortedSyncPts(I).Frame - 1) * Interval!
LINE (x, 20)-(x, 320), TextLineColor
LOCATE I + 3, 1
IF I > 1 AND I < NoOfSortedSyncPts THEN
COLOR TextLineColor: PRINT SortedSyncPts(I) -Label: COLOR 5
END IF NEXT FOR Frame = 1 TO NoOfFrames
XPos = 40 + (Frame - 1) * Interval!
LINE (XPos, 320)-(XPos, 325), 7
CIRCLE (XPos, 320 - 2 * FrmToFrmVelocity! (Frame) ) , 3, 15 NEXT END SUB
SUB EnterRawPt (Ptlndex) SetArrayReal RawPtsXPg, Ptlndex, XYZ.x SetArrayReal RawPtsXPg + 1 Ptlndex, XYZ y SetArrayReal RawPtsXPg + 2, Ptlndex, XYZ Z SetA RawPtsXPg, 0, Ptlndex END SUB
SUB ErsMnu
LINE (0, 0)-(639, 28), 0, BF END SUB
FUNCTION FindAln (aMatchPt, aPomtNdx) ' Returns an index into the line table 1 = 0
DO 1 = 1 + 1 LOOP UNTIL I > NoOfLines OR (aPomtNdx >= ALns(I) Beg AND aPomtNdx <= ALns(I).Fin) IF I <= NoOfLmes THEN
FindAln = I
MtchPts(aMatchPt, 5) = ALnsd) WchGrp
MtchPts(aMatchPt, 6) = ALns(I) .WchObj
MtchPts(aMatchPt, 7) = I ELSE
FindAln = -1 END IF END FUNCTION
FUNCTION FindAlnForIntermit (WchPt)
1 = 0
DO 1 = 1 + 1
LOOP UNTIL I > NoOfLmes OR (WchPt >= ALnsd) Beg AND
WchPt <= ALnsd) Fin) IF I <= NoOfLmes THEN
FindAlnForlntermit = I ELSE
FindAlnForlntermit = -1 END IF
END FUNCTION
SUB FmdDesPt (WchPose, WchLine) Range = 0 Foundlt = False DO
Range = Range + 1 SELECT CASE WchPose CASE 1
GetStartFinish ALnsO , WchLine, Start, Finish FindlnRng APtsXPg, Start, Finish, Range CASE 2
GetStartFinish BLnsO , WchLine, Start, Finish FindlnRng BPtsXPg, Start, Finish, Range CASE 3
GetStartFinish CLns() , WchLme, Start, Finish FindlnRng CPtsXPg, Start Finish, Range CASE 4
GetStartFinish DLnsO , WchLine, Start, Finish FindlnRng DPtsXPg, Start, Finish, Range END SELECT
LOOP UNTIL Foundlt OR (Range > 10) IF ThisOne < Start + 10 OR ThisOne > Finish - 10 THEN
BEEP: BEEP:
Foundlt = False END IF
IF Foundlt = False THEN
LOCATE 3, 1
PRINT "Not Found Or Too Close To Start Or End Of A Line'
SLEEP 1
LOCATE 3, 1: PRINT SPACES(70) END IF END SUB
SUB FindFrmlnChartObjGrpWarp (Kind, WchOne, WchFrame) DO Wndln CalcFlatXY ShowFlatCrsr
FrameNo = CINT( (XYZ.x - 40) / Interval' + 1) IF FrameNo > 0 AND FrameNo <= NoOfFrames THEN LOCATE , 30 PRINT "Frame"; FrameNo DistFromPrev = FrameNo - syncpts(SyncPtlndex) .Frame LOCATE 3, 1. PRINT "Distance From Previous SyncPt", DistFromPrev IF INP(889) < 128 THEN Foundlt = True WchFrame = FrameNo
PRINT SPACES(15) PRINT SPACES(65)
Figure imgf000122_0001
SUB FindlnApts (FoundPt) Range = 0 Foundlt = False DO
Range = Range + 1
FindlnRng APtsXPg, 1, GetA(APtsXPg, 0), Range LOOP UNTIL Foundlt OR (Range > 10) IF Foundlt = True THEN FoundPt = ThisOne IF Foundlt = False THEN
LOCATE 3, 1. PRINT "Not Found" . SLEEP 1
Figure imgf000122_0002
TrialZ < XYZ.Z + Range * 4 AND TπalZ > XYZ.Z - Range * 4 THEN Foundlt = True EXIT DO END IF LOOP
IF Foundlt = True THEN ThisOne = I
XYZ.x = TrialX: XYZ y = TrialY XYZ.Z = TrialZ FoundPt = XYZ END IF END SUB
SUB FindLngstSeg
SumSegLen = 0
FOR I = 1 TO NoOfSegs
SegLen(l) = (TempSegs(I) .AEndPt - TempSegs(I) .AStartPt) + 1 SegLen(2) = (TempSegs(I) .BEndPt - TempSegs(I).BStartPt) + 1 SegLen(3) = (TempSegs(I) .CEndPt - TempSegs(I).CStartPt) + 1 SegLen(4) = (TempSegs(I) .DEndPt - TempSegs(I).DStartP ) + 1 BestLenSoFar = 0 FOR s = 1 TO 4
IF SegLen(s) > BestLenSoFar THEN BestLenSoFar = SegLen(s) Longest = s END IF NEXT LongestSegd, 0) = Longest 'the val of the 0 posit is the Pose in which seg(ι) is the longest LongestSegd, 1) = SegLen(Longest) 'the val of the 1 posit is the length SumSegLen = SumSegLen + BestLenSoFar 'total length of segs after justification NEXT END SUB
SUB F dMrkdPtlnAPose (ThisOne, TextS) LOCATE 2, 1: PRINT TextS Foundlt = False WHILE Foundlt = False
GetWndXYZ 0
FindlnApts ThisOne WEND
GetXYZ ThisOne Mrk 1, 1 MyDelay 1
LOCATE 1, 1- PRINT SPACES(35) END SUB
FUNCTION FindWchFinlSg (Array0 AS FinlSgType, PointNdx)
1 = 0
DO: 1 = 1 + 1
LOOP UNTIL I > NoOfSegs OR (PointNdx >= Array(I) .Beg AND
PointNdx <= Arrayd) .Fm) IF I <= NoOfSegs THEN
FindWchFinlSg = I ELSE
FindWchFinlSg = -1 END IF END FUNCTION FUNCTION GetA (PageNo, Index)
GetArray PageNo, Index, Value
GetA = Value END FUNCTION
FUNCTION GetAReal' (PageNo, Index)
GetArrayReal PageNo, Index, Value!
GetAReal = Value! END FUNCTION
SUB GetlmFxXYZ (ImToFix, PtPosit)
XYZ.x = GetAReal! (APtsXPg + 3 * (ImToFix - 1), PtPosit) XYZ.y = GetAReal! (APtsYPg + 3 * (ImToFix - 1), PtPosit) XYZ.Z = GetAReal! (APtsZPg + 3 * (ImToFix - 1), PtPosit)
END SUB
SUB GetPts (PtArray, PtArrayNdx) XYZ.x = GetAReal! (PtArray, PtArrayNdx) XYZ.y = GetAReal! (PtArray + 1, PtArrayNdx) XYZ.Z = GetAReal!(PtArray + 2, PtArrayNdx) END SUB
SUB GetStartFinish (LnLstO AS LineType, LnNo, Start, Finish)
Start = LnLst(LnNo) .Beg
Finish = LnLst(LnNo) .Fin END SUB
SUB GetSumWarpDisp (SegInfoLst() , SeglnfLstlndx, FrameNo,
SegNo, SegPtNo, SumWarpDisp AS t3DPoιnt) DIM WarpSegPathPtPosit AS t3DPoint DIM HndlPathDiff AS t3DPoint DIM WarpSegWaveDisp AS t3DPoint
SumWarpDisp.x = 0: SumWarpDisp.y = 0: SumWarpDisp.Z = 0 FOR I = 1 TO SeglnfLstlndx = SeglnfoLst(I)
.**»**.* wnere ln wa∑ path if inertia or wind warp:
IF Seglnfo( ) .Kind = "Iner" OR Seglnfo(m) .Kind = "Wind" THEN AdjFrameNo = FrameNo - 5
IF AdjFrameNo < 1 THEN AdjFrameNo = 1 'this delays warp so it feels like an effect of movement WarpSegPathArrayPositPtr AdjFrameNo, Seglnfo(m) .WchPath,
WarpSegPathPtPosit END IF IF Seglnfo(m) .Kind = "Time" THEN
WarpSegPathArrayPositPtr FrameNo, Seglnfo(m) .WchPath, WarpSegPathPtPosit END IF "******* wave position along segment:
' (length of seg is in Seglnfo(m) .SegLen) SELECT CASE Seglnfo(m) .WchWave CASE 1
LenOfWave = GetA(JAPtsXPg, 0) CASE 2
LenOfWave = GetA(JBPtsXPg, 0) CASE 3
LenOfWave = GetA(JCPtsXPg, 0) CASE 4
LenOfWave = GetA(JDPtsXPg, 0) END SELECT
IF Seglnfo(m) .Kind = "Wave" THEN
SELECT CASE Seglnfo(m) .OverLap
CASE 0 'ol at start ol at end
LM = Seglnfo( ) SegLen
Increment = (LM / NoOfFrames * WaveSpeed) * FrameNo SELECT CASE Seglnfo(m) .Direc CASE "HtoT"
PositionNo = SegPtNo + LenOfWave / 2 - Increment CASE "TtoH"
PositionNo = SegPtNo + Increment END SELECT CASE 1 'ol at start no ol at end
LM = Seglnfo(m) SegLen
Increment = (LM / NoOfFrames * WaveSpeed) * FrameNo SELECT CASE Seglnfo(m) .Direc CASE "HtoT"
PositionNo = SegPtNo - Increment CASE "TtoH"
PositionNo = SegPtNo + Increment END SELECT CASE 2 'no ol at start ol at end
LM = Seglnfo( ) .SegLen
Increment = (LM / NoOfFrames * WaveSpeed) * FrameNo SELECT CASE Seglnfo(m) .Direc CASE "HtoT"
PositionNo = SegPtNo + LenOfWave - Increment CASE "TtoH"
PositionNo = SegPtNo + Increment END SELECT CASE 3 'no ol at start no ol at end
IM = 2 * Seglnfo(m) SegLen
Increment = (LM / NoOfFrames * WaveSpeed) * FrameNo SELECT CASE Seglnfo( ) .Direc CASE "HtoT"
PositionNo = SegPtNo + LenOfWave - Increment CASE "TtoH"
PositionNo = SegPtNo + Increment END SELECT END SELECT
EndOfWave = LenOfWave
IF PositionNo > LenOfWave THEN PositionNo = LenOfWave
'end of wave array IF PositionNo < 1 THEN PositionNo = 1
WarpSegWaveShapePtr PositionNo, Seglnfo( ) .WchWave, WarpSegWaveDisp END IF
****** where along the warp profile is this image (segment) point' 'Prop' is how much the point will be affected by the 'displacement between the warp handle and the position on the warp path
WherelnProf = SegPtNo + Seglnfo( ) .ProfBeg - 1 Prop' = WarpSegProfPtr(Seglnfo( ) .WchPro , WherelnProf)
'****** get the displacement for this warp:
IF Seglnfo(m) .Kind = "Time" OR Seglnfo( ) .Kind = "Iner" OR Seglnfo(m) -Kind = "Wind" THEN HndlPathDiff-x = WarpSegPathPtPosit. -
GetAReal! (APtsXPg, Seglnfo(m) .Hndl) HndlPathDiff.y = WarpSegPathPtPosit.y -
GetAReal' (APtsYPg, Seglnfo( ) .Hndl) HndlPathDiff.Z = WarpSegPathPtPosit.Z -
GetAReal' (APtsZPg, Seglnfo( ) .Hndl) WarpSegDisp.x = (HndlPathDiff.x * Prop!) WarpSegDisp.y = (HndlPathDiff.y * Prop') WarpSegDisp.Z = (HndlPathDiff-Z * Prop!) END IF
IF Seglnfo(m) .Kind = "Wave" THEN
WarpSegDisp. = (WarpSegWaveDisp.x * Prop')
WarpSegDisp y = (WarpSegWaveDisp.y * Prop')
WarpSegDisp.Z = (WarpSegWaveDisp.Z * Prop1) END IF
'******: add it to any other warp(s) if any:
SumWarpDisp.x = SumWarpDisp.x + WarpSegDisp.
SumWarpDisp.y = SumWarpDis .y + WarpSegDisp.y
SumWarpDisp.Z = SumWarpDisp.Z + WarpSegDisp.Z NEXT END SUB
SUB GetVelGraphFromPath (aArray)
PtsPerFrame' = (GetA(aArray, 0) - 1) / (NoOfFrames - 1)
FOR Frame = 2 TO NoOfFrames
StartPt' = (Frame - 2) * PtsPerFrame' + 1
EndPt' = StartPt' + PtsPerFrame'
IF INT(StartPt' ) = INT(EndP ') THEN
FrmToFrmVelocity' (Frame) = DistToNextPoint(aArray, INT(StartPt') )
* (EndPt! - StartPt' ) ELSE
SumD! = DistToNextPoint(aArray, INTlStartPt' ) ) *
(INT(StartPt!) + 1 - StartPt!) FOR I = INTlStartPt' ) + 1 TO INT(EndPt!) - 1 SumD' = SumD! + DistToNextPoint(aArray, I) NEXT IF INT(EndPt!) <> EndPt' THEN
SumD' = SumD' + DistToNextPoint(aArray, INT(EndPt')) *
(EndPt' - INT(EndPt')) END IF
FrmToFrmVelocity' (Frame) = SumD' END IF NEXT END SUB
SUB GetVelGraphFromUser (aDrawnPath) LOCATE 1, 1: PRINT "Redraw Velocity Graph"
. *...**..«»»»..,..*.***.****.*** Walt for button down WHILE INPI889) >= 128 Wndln IF XYZDiff THEN ShowFlatCrsr WEND FOR I = 1 TO 1000. NEXT 'Short Delay for Button Bounce
******************************* Draw velocity curve Index = 0
WHILE INP(889) < 128 Wndln
IF XYZDiff THEN ShowFlatCrsr PSET (XYZ.x, XYZ.y), 15 Index = Index + 1 EnterRawPt Index END IF WEND
, *.**»*»*****.********.********* convert curve to velocities
FrmToFrmVelocity' (1) = 0
J = 2
FOR Frame = 2 TO NoOfFrames
WHILE (GetAReal' (RawPtsXPg, J) < 40 + (Frame - 1) * Interval') AND (J < GetA(RawPtsXPg, 0)) J = J + 1
WEND dx' = GetAReal' (RawPtsXPg, J) - GetAReal' (RawPtsXPg, J - 1)
IF dx' = 0 THEN dx' = 01
DY' = GetAReal' (RawPtsYPg, J) - GetAReal' (RawPtsYPg, J - 1)
Vel' = 320 - (GetAReal' (RawPtsYPg, J - 1) + DY' * (40 + (Frame - 1)' Interval' - GetAReal' (RawPtsXPg, J - 1>) / dx' )
' Vel is PrevY + DY * (X - PrevX) / DX
FrmToFrmVelocity' (Frame) = Limits(Vel', 0', 275')
CIRCLE (40+(Frame-1) 'Interval' , 320-FrmToFrmVelocιty' (Frame) ) ,3,14 NEXT
. **.**..»*..*.*...,..* adjust vels for total length and syncPoints FOR Segment = 1 TO NoOfSortedSyncPts - 1 SegLength' = 0 TotalSegVels' = 0 FOR PtNo = SortedSyncPts(Segment) .TempPtslndex TO
SortedSyncPts(Segment + 1) TempPtslndex - 1 SegLength1 = SegLength' + DistToNextPoint' (aDrawnPath, PtNo) NE-XT
FOR Frame = SortedSyncPts(Segment) Frame + 1 TO SortedSyncPts(Segment + 1) .Frame TotalSegVels' = TotalSegVels' + FrmToFrmVelocity' (Frame) NEXT
FOR Frame = SortedSyncPts(Segment) Frame + 1 TO SortedSyncPts(Segment + 1) .Frame IF TotalSegVels' = 0 THEN
FrmToFrmVelocity' (Frame) = 0 ELSE
FrmToFrmVelocity (Frame) =
FrmToFrmVelocity' (Frame) * SegLength' / TotalSegVels' END IF NEXT NEXT END SUB
SUB GetWarpProfile (WarpNo)
, *..♦....*♦.**....,.*....*.**.*. D1Spiay layout on screen CLS
LOCATE 1, 1: PRINT "Draw Profile of Desired Warp Along
Selected Segments(s)" LOCATE 3, 1: PRINT "Full Warp Effect" LOCATE 23, 1: PRINT "No Warp Effect" LINE (0, 42)-(639, 42), 6 LINE (0, 308)-(639, 308), 6 LINE (30, 42)-(30, 308) , 15 TotalSegsLen = 0 FOR I = 1 TO NoInSrs
TotalSegsLen = TotalSegsLen + WarpSrs(I, 0) NEXT
Pointlnterval! = 600! / (TotalSegsLen - 1) FOR I = 0 TO TotalSegsLen - 1
LINE (30+I*PointInterval! ,305)-(30+I*PointInterval! ,307) , 15 NEXT
Length = 0 FOR I = 1 TO NoInSrs
Length = WarpSrs(I, 0) + Length
POSIT = CINT((Length - 1) * Pointlnterval!)
LINE (30 + POSIT, 42)-(30 + POSIT, 308), 10 NEXT LINE (30 + POSIT, 42)-(30 + POSIT, 308), 15
. *..*****.*..*.**...**.... sno a-Pose of segments being warped FOR J = 1 TO NoOfSegs
IF FinlSgs(J) .WarpNo = WarpNo THEN
DrawPartialArray APtsXPg, FinlSgs(J) .Beg, FinlSgs(J) .Fin, -1, False ShowASegStart J END IF NEXT
■ *******.******.***»..********.* w it for button down WHILE INP(889) >= 128
Wndln
IF XYZDiff THEN ShowFlatCrsr WEND FOR I = 1 TO 1000: NEXT 'Short Delay for Button Bounce
, ******************************* Draw warp profile Index = 0
WHILE INP(889) < 128 Wndln
IF XYZDiff THEN ShowFlatCrsr PSET (XYZ.x, XYZ.y), 15 Index = Index + 1 EnterRawPt Index END IF WEND
. »*********•***•*********••••** smoot and redraw
Smooth RawPtsXPg, TeπpPtsXPg, 3, True
FOR I = 1 TO GetA(RawPtsXPg, 0)
ShowFlatPt GetAReal! (RawPtsXPg, I), GetAReal! (RawPtsYPg, I), 13 ShowFlatPt GetAReal! (TeπpPtsXPg, I), GetAReal! (TeitpPtsYPg, I), 15
NEXT
. A****************************** convert to proportions J = 2 FOR PtNo = 1 TO TotalSegsLen
WHILE (GetAReal' (TeπpPtsXPg, J) < 30 (PtNo - 1) * Pointlnterval') AND (J < GetA(TeπpPtsXPg, 0) ) J = J + 1 WEND dx' = GetAReal' (TempPtsXPg, J) - GetAReal' (TempPtsXPg, J 1) IF dx' = 0 THEN dx1 = .01
DY' = GetAReal1 (TempPtsYPg, J) - GetAReal' (TempPtsYPg, J - 1) Prop' = (308-(GetAReal' (TempPtsYPg, J-1) + DY' * (30+(PtNo-l)*PoιntInterval'- GetAReal' (TempPtsXPg, J-1) ) / dx')) / 267' ' Prop is PrevY + DY * (X - PrevX) / DX Prop' = Limits(Pro ' , 0', 1') SetArrayReal RawPtsXPg, PtNo, Prop'
CIRCLE (30 + (PtNo - 1) * Pointlnterval', 308 - Prop' * 267), 3, 14 NEXT
END SUB
SUB GetWndXYZ (Kind) Foundlt = False
DO
Wndln
ShowCrsr
IF INP(889) < 128 THEN
Wx = XYZ x Wy = XYZ y Wz = XYZ.Z EXIT DO END IF IF Kind = 1 THEN
FOR I = 1 TO NoOfFrames J = Spacer * I + 30
IF XYZ x = J THEN LOCATE 2, 30 PRINT "Frame' NEXT END IF LOOP END SUB
SUB GetXYZ (WchPt) XYZ x = GetAReal' (APtsXPg, WchPt) XYZ y = GetAReal' (APtsYPg, WchPt) XYZ Z = GetAReal' (APtsZPg WchPt) END SUB
SUB HiLiFinlSg (SegNo)
IF ChoicelnSegHili = True THEN
BS = "Confirm" C$ = "Reject
WndChs "' , "x", B$, CS, "x "x", Ans$, 1 END IF
Start = FinlSgs(SegNo) .Beg Finish = FinlSgs(SegNo) Fm DO WHILE XYZ y > 15
XYZ.x = GetAReal' (APtsXPg, Start)
XYZ y = GetAReal1 (APtsYPg, Start)
XYZ.Z = GetAReal' (APtsZPg, Start)
Mrk 3, 1 counter = 0
DO WHILE counter < 20000 counter = counter + 1 LOOP
Mrk 3 , 1
FOR I = Start TO Finish - 3 STEP 2 FOR J = I TO I + 3 Wndln
IF XYZ.y < 15 THEN EXIT DO ShowCrsr GetXYZ (J) Draw3DPoιnt XYZ, 0 IF INP(889) < 128 THEN EXIT DO NEXT
FOR J = I TO I + 3 Wndln ShowCrsr GetXYZ (J) Draw3DPoιnt XYZ, -1 IF INP(889) < 128 THEN EXIT DO NEXT NEXT LOOP
IF ChoicelnSegHili = True THEN WndSlct AnsS, 1 ErsMnu END IF
ChoicelnSegHili = False END SUB
SUB HiLiLn (LnArrayO AS LineType, PtArray, LnNo) DIM ptl AS t3DPoιnt, Pt2 AS t3DPoιnt
IF WchPoseForHili > 1 AND LnNo < ALnslO) -Beg + 1 THEN GetStartFinish LnArrayO , LnNo, Start, Finish Done = False
IF Finish > Start + 5 THEN WHILE NOT Done
GetPts PtArray, Start 'puts values into XYZ Mrk 3, 1 counter = 0
DO WHILE counter < 30000 counter = counter + 1 LOOP Mrk 3, 1 FOR I = Start TO Finish - 1
GetArrayReal PtArray + 0, I, Ptl.x GetArrayReal PtArray + 1, I, Ptl.y GetArrayReal PtArray + 2, I, Ptl.Z GetArrayReal PtArray + 0, I + 1, Pt2.x GetArrayReal PtArray + 1, I + 1, Pt2.y GetArrayReal PtArray + 2, I + 1, Pt2.Z Draw3DLme Ptl, Pt2, 0 Delay = 0
Done = (INP(889) < 128) WHILE Delay < 2 AND NOT EarlyExit Wndln
Done = ((INP(889) < 128) OR (XYZ y < 15)) ShowCrsr
Delay = Delay + 1 WEND Draw3DLιne Ptl, Pt2, -1 IF Done THEN EXIT FOR NEXT WEND END IF END IF END SUB
SUB IdentGroups WchPoseForHili = 2 LastGrp = 0
WHILE GroupsDefnd = False FOR I = 1 TO ALns(0) .Beg
AS = "1": B$ = "2": CS = "3" D$ = "4": E$ = "5" WndChs "ASSIGN INDICATED LINE TO A GROUP",
AS, B$, C$, D$, ES, AnsS, 1 HiLiLn ALnsO, APtsXPg, I WndSlct AnsS, 1 WchGrp = VAL(AnsS) IF WchGrp > LastGrp + 1 THEN BEEP. LOCATE 3, 1 PRINT 'Can't Skip A Number; Assign Group Again
(Last Assignment Was To Group", LastGrp; ")" SLEEP 3
LOCATE 3, 1. PRINT SPACES(40) 1 = 1 - 1 CLS ELSE
PutlnGrp I, WchGrp LastGrp = WchGrp END IF NEXT RedoGroupsOK:
SELECT CASE UserChoice!"", "", "", "Groups OK", "Redo", ""; CASE 3
GroupsDefnd = True CASE 4
FOR I = 1 TO NoOfGroups ALnsd) .WchGrp = 0 BLns(I) .WchGrp = 0 CLns(I) .WchGrp = 0 DLns(I) .WchGrp = 0 NEXT
NoOfGroups = 0 CASE ELSE
GOTO RedoGroupsOK END SELECT WEND END SUB
SUB IdentObjects LastObj = 0
WHILE ObjectsDefnd = False FOR I = 1 TO NoOfGroups
CLS
FOR J = 1 TO NoOfLmes
IF ALns(J) .WchGrp = I THEN ShowLn 1, J, -1
NEXT
FS = "ASSIGN " : G$ = Group(I).Label: H$ = " TO AN OBJECT"
JS = FS + G$ + HS
WchObj = UserChoice(J$, "1", "2", "3", "", "") IF WchObj > LastObj + 1 THEN BEEP: LOCATE 3, 1 PRINT "Can't Skip A Number; Assign Object Again
(Last Assignment Was To Object"; LastObj, ")" SLEEP 3
LOCATE 3, 1: PRINT SPACES(40) 1 = 1 - 1 CLS ELSE
PutlnOb I, WchObj LastObj = WchObj END IF NEXT
SELECT CASE UserChoice("" , "", "", "Objects OK", "Redo", "") CASE 3
Ob ectsDefnd = True CASE 4
FOR K = 1 TO NoOfOb ALns(K) -WchObj = 0 BLns(K) .WchObj = 0 CLns(K) .WchObj = 0 DLns(K) .WchObj = 0 Group(WchGrp) .WchObj = 0 NEXT
NoOfOb = 0 END SELECT WEND END SUB
SUB Interpo (Array, StartOfGap, EndOfGap)
'this creates missing pts in gaps between 'two susequent values of array NoOfGaps = EndOfGap - StartOfGap ValDiff = GetAReal' (Array, EndOfGap) -
GetAReal! (Array, StartOfGap) 'for x Iner! = ValDiff / NoOfGaps
FOR I = StartOfGap - StartOfGap + 1 TO EndOfGap - StartOfGap - 1 SetArrayReal Array, StartOfGap + I,
GetAReal' (Array, StartOfGap) + (I * Iner') NEXT ValDiff = GetAReal! (Array + 1, EndOfGap) -
GetAReal! (Array + 1, StartOfGap) 'for y Iner' = ValDiff / NoOfGaps
FOR I = StartOfGap - StartOfGap + 1 TO EndOfGap - StartOfGap - 1 SetArrayReal Array + 1, StartOfGap + I,
GetAReal! (Array + 1, StartOfGap) + (I * Iner') NEXT ValDiff = GetAReal! (Array + 2, EndOfGap) -
GetAReal! (Array + 2, StartOfGap) 'for z Iner' = ValDiff / NoOfGaps
FOR I = StartOfGap - StartOfGap + 1 TO EndOfGap - StartOfGap - 1 SetArrayReal Array + 2, StartOfGap + I,
GetAReal! (Array + 2, StartOfGap) + (I * Iner!) NEXT END SUB
SUB JstfyTeπpSegsPartA
SegStart = 1
FOR I = 1 TO NoOfSegs
IF SegLend) <> 0 AND SegLen(2) <> 0 AND SegLen(3) <> 0 AND SegLen(4) <> 0 THEN SegEnd = SegStart + LongestSegd, 1) - 1 JstfyTempSegsPartB I, LongestSegd, 0), SegStart, SegEnd FinlSgs(I) .Beg = SegStart FinlSgs(I) .Fin = SegEnd SegStart = SegEnd + 1 END IF
FinlSgs(I) .WchGrp = TempSegs(I) .WchGrp FinlSgs(I) .WchObj = TempSegs(I).WchObj FinlSgs(I) -WchLine = TempSegs(I) -WchLine NEXT
SetA JAPtsXPg, 0, SegEnd SetA JBPtsXPg, 0, SegEnd SetA JCPtsXPg, 0, SegEnd SetA JDPtsXPg, 0, SegEnd FOR I = 1 TO NoOfLines FOR J = 1 TO NoOfSegs
IF FinlSgs(J) .WchLine = I THEN
ALns(I).FinalStart = FinlSgs(J) -Beg EXIT FOR END IF NEXT FOR J = 1 TO NoOfSegs
IF FinlSgs(J) -WchLme = I THEN
ALnsd) .FinalEnd = FinlSgs (J) .Fm END IF NEXT
ALnsd).Beg = ALns(I) .FinalStart ALns(I) .Fin = ALns(I) .FinalEnd BLns(I) .Beg = ALns(I) .FinalStart BLns(I) .Fm = ALns(I) -FinalEnd CLns(I) .Beg = ALns(I) .FinalStart CLns(I) .Fm = ALnsd) .FinalEnd DLns(I) .Beg = ALnsd) .FinalStart DLns(I) .F = ALns(I) .FinalEnd
NEXT END SUB
SUB JstfyTeπpSegsPartB (WchSeg, LngstSeg, SegStart, SegEnd)
'seg start,end, refers to len of the seg to which the Others will be stretched I = WchSeg
FOR J = SegStart TO SegEnd SELECT CASE LngstSeg
CASE 1 'first trans er vals of longest seg from APts toJAPts K = (J - (SegStart - TempSegs(I) .A≤tartPt) ) SetArrayReal JAPtsXPg, J, GetAReal! (APtsXPg, K) SetArrayReal JAPtsYPg, J, GetAReal! (APtsYPg, K) SetArrayReal JAPtsZPg, J, GetAReal! (APtsZPg, K)
CASE 2
K = (J - (SegStart - TempSegs(I).BStartPt) ) SetArrayReal JBPtsXPg, J, GetAReal! (BPtsXPg, K) SetArrayReal JBPtsYPg, J, GetAReal' (BPtsYPg, K) SetArrayReal JBPtsZPg, J, GetAReal! (BPtsZPg, K)
CASE 3
K = (J - (SegStart - TempSegs(I) .CStartPt) ) SetArrayReal JCPtsXPg, J, GetAReal! (CPtsXPg, K) SetArrayReal JCPtsYPg, J, GetAReal! (CPtsYPg, K) SetArrayReal JCPtsZPg, J, GetAReal! (CPtsZPg, K)
CASE 4
K = (J - (SegStart - TempSegs(I) -DStartPt) ) SetArrayReal JDPtsXPg, J, GetAReal! (DPtsXPg, K) SetArrayReal JDPtsYPg, J, GetAReal!(DPtsYPg, K) SetArrayReal JDPtsZPg, J, GetAReal! (DPtsZPg, K)
END SELECT
NEXT
SELECT CASE LngstSeg CASE 1
Stretch BPtsXPg, JBPtsXPg, TempSegs(I) .BStartPt,
TeπpSegs(I) .BEndPt SegStart, SegEnd
Stretch CPtsXPg, JCPtsXPg, TeπpSegs(I) .CStartPt,
TempSegs(I) .CEndPt,, SegStart, SegEnd
Stretch DPtsXPg, JDPtsXPg, TeπpSegs(I) .DStartPt,
TempSegs(I) .DEndPt,, SegStart, SegEnd
CASE 2
Stretch APtsXPg, JAPtsXPg, TeπpSegs(I) .AStartPt, TempSegs(I) .AEndPt,, SegStart, SegEnd
Stretch CPtsXPg, JCPtsXPg, TempSegs(I) . StartPt, TempSegs(I) .CEndPt, SegStart, SegEnd
Stretch DPtsXPg, JDPtsXPg, TempSegs(I) .DStartPt, TeπpSegs(I) .DEndPt, SegStart, SegEnd
CASE 3
Stretch BPtsXPg, JBPtsXPg, TempSegs(I) .BStartPt, TeπpSegs(I) .BEndPt, SegStart, SegEnd
Stretch APtsXPg, JAPtsXPg, TeπpSegs(I) .AStartPt, TempSegs(I) .AEndPt, SegStart, SegEnd
Stretch DPtsXPg, JDPtsXPg, TeπpSegs(I) .DStartPt, TeπpSegs(I) .DEndPt, SegStart, SegEnd
CASE 4
Stretch BPtsXPg, JBPtsXPg, TeπpSegs(I) .BStartPt, TempSegs(I) .BEndPt, SegStart, SegEnd
Stretch APtsXPg, JAPtsXPg, TeπpSegs (I) .AStartPt, TeπpSegs(I) .AEndPt, SegStart, SegEnd
Stretch CPtsXPg, JCPtsXPg, TeπpSegs(I) .CStartPt, TempSegs(I) .CEndPt, SegStart, SegEnd
END SELECT END SUB
SUB LdLnLnArrays (WchPose, Col)
IF WchPose = 1 THEN LdLnLst ALns() , WchPose, Col IF WchPose = 2 THEN LdLnLst BLns() , WchPose, Col IF WchPose = 3 THEN LdLnLst CLns() , WchPose, Col IF WchPose = 4 THEN LdLnLst DLns() , WchPose, Col
END SUB
SUB LdLnLst (Array!) AS LineType, WchPose, Col) Array(LnNo) .Beg = ArraylLnNo - 1) -Fin + 1 Array(LnNo) .Fin = GetA(APtsXPg + 3 * (WchPose 1), 0) Array(0) .Beg = LnNo
END SUB
FUNCTION Limits! (x! L! , Hϋ IF x! < L! THEN AND
Figure imgf000135_0001
SUB MarkSpaceRefPts ShowSpaceRefPts
STATIC I
AnsS = ""
DO UNTIL AnsS = C$
1 = 1 + 1
TextS = "If Wanted, Mark Reference Points In Space For Drawing Space Path Of " + Object(WchObj) -Label
DefnPt SpaceRef(I) .Locat, TextS, "MarkSpaceRefPts", 2
SpaceRef(0) .Visib = I LOOP END SUB
SUB MkFrameScreenV4 (Kind, WchOne)
SELECT CASE Kind CASE 1
TextS = "Object " + Object(WchOne) .Label
ColorCode = 2 CASE 2
TextS = "Group " + Group(WchOne) .Label
ColorCode = 3 CASE 3
Texts = "Warp " + Warp(WchOne) .Label
ColorCode = 4 END SELECT CLS
LOCATE 5, 1 PRINT TextS YPos = 80 Height = 14
LINE (0, YPos)-(639, YPos), ColorCode
LINE (0, YPos + Height)-(639, YPos + Height), ColorCode LINE (0, YPos)-(39, YPos + Height), ColorCode, BF FOR Frame = 1 TO NoOfFrames XPos = 40 + Interval' * (Frame - 1)
LINE (XPos, YPos)-(XPos, YPos + Height), ColorCode NEXT END SUB
SUB MxMrkrs
LINE (1, 8)-(4, 5), LCol
LINE -!7, 8) , LCol
LINE (4, 8)-(4, 5) , LCol
GET (0, 0)-(9, 9) , LCrsr
LINE (1, 8)-(4, 5), RCol
LINE -(7, 8) , RCol
LINE (4, 8)-(4, 5), RCol
GET (0, 0)-(9, 9), RCrsr: CLS
CIRCLE (4, 4), 2, LCol: GET (0, 0)-(9, 9), CmrkL CIRCLE (4, 4), 2, RCol: GET (0, 0)-(9, 9), CmrkR: CLS
LINE (0, 0)-(8, 8), LCol, B. GET (0, 0)-(9, 9), SgmrkL LINE (0, 0)-(8, 8), RCol, B GET (0, 0)-(9, 9), SqmrkR CLS
LINE (0, 6)-(8, 6), LCol: LINE (0, 6)-(4, 1), LCol. LINE -(8, 6), LCol GET (0, 0)-(9, 9) , TrmrkL
LINE (0, 6)-(8, 6), RCol. LINE (0, 6)-(4, 1), RCol LINE -(8, 6), RCol GET (0, 0)-(9, 9), TrmrkR: CLS
LINE (0, 4)-(9, 4), LCol: LINE (4, 0)-(4, 9), LCol
GET (0, 0)-(9, 9), CrossMrkL
LINE (0, 4)-(9, 4), RCol: LINE (4, 0)-(4, 9), RCol
GET (0, 0)-(9, 9), CrossMrkR
END SUB
SUB MkPathCycle
IF Confirm("Mk Cycle?") THEN
IF GetA(TempPtsXPg, 0) > 30 THEN DrawArray TempPtsXPg, 0, False SmoothJoin TempPtsXPg, 30 NoOfFrames = NoOfFrames - 1
LOCATE 3, 1 PRINT "Frames Reduced To"; NoOfFrames ELSE
LOCATE 3, 1: PRINT "Too Short" END IF END IF
DrawArray TempPtsXPg, -1, False END SUB
SUB MkScaffold
IF Confirm!"Mark Scaffold On <A> Source Pose For Reference When Drawing Other Source Poses' ") THEN
MrkScaffoldCntr "Mark Scaffold Center", 1, 1
Scaffold = True
MrkScaffoldPts END IF END SUB
SUB MkSegs
DIM SegStarts (NoOfLmes + NoOfMtchPts + 1) AS TempSegType
FOR I = 1 TO NoOfLines SegStartsd) .AStartPt = ALnsd).Beg SegStartsd) .BStartPt = BLns(I).Beg SegStartsd) .CStartPt = CLns(I).Beg SegStartsd) .DStartPt = DLns(I) .Beg SegStartsd) .WchGrp = ALns(I) .WchGrp SegStartsd) .WchObj = ALns ) .WchObj NEXT J = 0 IF NoOfMtchPts > 0 THEN
FOR I = 1 TO NoOfMtchPts + 1
J = NoOfLines + I
SegStarts(J) .AStartPt = MtchPts(I, 1)
SegStarts(J) .BStartPt = MtchPts(I, 2)
SegStarts(J) .CStartPt = MtchPtsd, 3)
SegStarts(J) .DStartPt = MtchPtsd, 4)
SegStarts(J) .WchGrp = MtchPtsd, 5) SegStarts(J) .WchObj = MtchPtsd, 6) NoOfSegs = J - 1
NEXT ELSE
NoOfSegs = NoOfLines END IF
FOR K = 1 TO NoOfSegs - 1 FOR I = 1 TO NoOfSegs - K
IF SegStartsd) .AStartPt > SegStartsd + 1) .AStartPt THEN SWAP SegStartsd) .AStartPt, SegStarts + 1) .AStartPt SWAP SegStartsd) .BStartPt, SegStartsd + 1) .BStartPt SWAP SegStarts ) .CStartPt, SegStartsd + 1) .CStartPt SWAP SegStarts(I).DStartPt, SegStartsd + 1) .DStartPt
SWAP SegStarts(I).WchGrp, SegStarts + 1) .WchGrp SWAP SegStarts(I).WchObj, SegStartsd + 1) .WchObj END IF NEXT I NEXT
FOR I = 1 TO NoOfSegs 'terπpsegs are unjustified segs TempSegs(I) .AStartPt = SegStarts(I) .AStartPt TempSegs!I) .BStartPt = SegStarts(I).BStartPt TempSegs(I) .CStartPt = SegStartsd) CStartPt TempSegs(I) .DStartPt = SegStarts(I).DStartPt
TempSegs(I) .WchGrp = SegStarts(I) .WchGrp
TempSegs(I) .WchObj = SegStarts(I) .WchObj
IF SegStartsd + 1).AStartPt <> 0 THEN
TempSegs(I) .AEndPt = SegStartsd + 1) .AStartPt - 1 TempSegs{I) .BEndPt = SegStarts(I + 1) .BStartPt - 1 TempSegs(I) .CEndPt = SegStarts(I + 1) .CStartPt - 1 TeπpSegs(I).DEndPt = SegStartsd + 1) .DStartPt - 1
ELSE
TeπpSegs(I) .AEndPt = ALns(NoOfLines) .Fin
TeπpSegs(I) .BEndPt = BLns(NoOfLines) .Fin
TeπpSegs(I).CEndPt = CLns(NoOfLines) .Fin
TempSegs(I) .DEndPt = DLns(NoOfLines) .F
END IF NEXT FOR I = 1 TO NoOfSegs FOR J = 1 TO NoOfL es
IF TeπpSegs(I) .AStartPt >= ALns(J) .Beg AND
TempSegs(I) .AEndPt <= ALns(J) .Fin THEN TempSegs(I) WchLine = J NEXT NEXT REDIM SegStarts(0) AS TempSegType
END SUB
SUB MkTetLns (Vertex, OtherVertex)
LINE (TEnds(Vertex) -lx, TEnds(Vertex) .y)- (TEnds(OtherVertex) .lx,
TEnds(OtherVertex) .y) , LCol LINE (TEnds(Vertex) .rx, TEnds(Vertex) .y)-(TEnds(OtherVertex) .rx,
TEnds(OtherVertex) .y) , RCol END SUB
SUB MkUniPath (TextS, MkUniPathFor)
. ******************************* Draw stuff in background LOCATE 1, 1 SELECT CASE MkUniPathFor
CASE eObjPath. PRINT "Draw Path In Space Or Static Position For "
+ TextS CASE eTScript SetupTetra
LOCATE 1, 1. PRINT "Draw Action Control Graph For " + TextS IF LinkingToPreviousRun = True THEN LOCATE 2, 1. BEEP PRINT "Chained —You MUST Start Action Control
Graph Exactly At <A> Source Pose Vertex'" END IF CASE eWarpPath: PRINT "Draw Path For Warp Handle" CASE eWaveShape PRINT "Draw Wave" CASE eWindPath: PRINT "Draw Wind Path" END SELECT
SetA FastWorkArraylXPg + 3 - gBuildToggle, 0, 0
' Inhibit initial erase
. ••**.************.**•••***••*• wait for button down WHILE INP(889) >= 128 Wndln
IF XYZDiff = True THEN ShowCrsr
LOCATE 2, 40. PRINT "Z="; XYZ.Z SELECT CASE MkUniPathFor
CASE eObjPath: ShowObjOnPath WchObj, Obj2, XYZ
CASE eTScript: ShowGroupTScript WchGrp, Group2, Scanlndex, "Temp" END SELECT END IF WEND
» ******************************* aw path Index = 0
WHILE INP(889) < 128 Wndln
IF XYZDiff = True THEN ShowCrsr LOCATE 2, 40 PRINT "Z="; XYZ.Z SELECT CASE MkUniPathFor
CASE eOb Path: ShowObjOnPath WchObj, Ob 2, XYZ CASE eTScript: ShowGroupTScript WchGrp, Group2, Scanlndex, "Temp" END SELECT Draw3DPomt XYZ, -1 Index = Index + 1 EnterRawPt Index END IF WEND
*********** ►***.* R d aw path as solid and confirm ok
SELECT CASE MkUniPathFor CASE eTScript: SetupTetra
CASE eWarpPath: ShowAllFnlSegs 1: ShowAllSegStarts CASE eWaveShape: Draw3DLine WaveRefStart, WaveRefEnd, -1
END SELECT
Smooth RawPtsXPg, TeπpPtsXPg, 3, False
DrawArray RawPtsXPg, 0, True
DrawArray TeπpPtsXPg, -1, True
END SUB
SUB Mrk (Kind, FlatStereo) 'FlatΞtereo: 0=flat l=stereo
IF FlatStereo - 1 THEN CalcLXRXY
IF FlatStereo = 0 THEN CalcFlatXY
CalcMrkrPts
IF MrkrPtS . lx > 5 AND MrkrPts . rx > 5 AND MrkrPts . lx < 645 AND MrkrPts . rx < 645 AND MrkrPts .y > 5 AND MrkrPts . y < 345 THEN IF Kmd = 0 THEN
Figure imgf000139_0001
END SUB
SUB MrkGrpCntr (MessageS, Pose, WchGrp)
DefnPt MarkedGrpCntr, MessageS, "", 3
IF Pose = 1 THEN AGrpCntr(WchGrp) MarkedGrpCntr
IF Pose = 2 THEN BGrpCntr(WchGrp) MarkedGrpCntr
IF Pose = 3 THEN CGrpCntr( chGrp) MarkedGrpCntr
IF Pose = 4 THEN DGrpCntr(WchGrp) MarkedGrpCntr
END SUB
SUB MrklntermtLine CLS
ShowAllFnlSegs 1 Finished = False DO WHILE Finished = False
SELECT CASE UserChoice!"", "ChooseLine' , "Finished", "", "", "") CASE 1
FindMrkdPtlnAPose ThisOne, "Mark The Line" WchLine = FindAlnForlntermit(ThisOne) ALns(WchLine) .Intermit = True
ALns(WchLine) .KeyForm = UserChoice("Which Source Pose Shows
This Line?", "A", "B", "C", "D" , "") LOCATE 4, 1 INPUT "Enter TriggerPt Range is 0 (always visible) TO 1
(vis if TScript at vertex)", ALns(WchLine) .Threshold LOCATE 4, 1 PRINT SPACES(79) CASE 2 EXIT DO END SELECT LOOP CLS END SUB
SUB MrkObjAnchorPt
CLS
ShowAllFnlSegs 1
TextS = "Mrk Point That Will Stay On Anchor"
FindMrkdPtlnAPose ThisOne, TextS
END SUB
SUB MrkObjCntr (Messages, WchPose, WchObj)
DefnPt MarkedObjCntr, Messages, "", 3
IF WchPose = 1 THEN : AObjCntr(WchObj ) = MarkedObjCntr
IF WchPose = 2 THEN : BObjCntr(WchObj) = MarkedObjCntr
IF WchPose = 3 THEN CObjCntr(WchObj) = MarkedObjCntr
IF WchPose = 4 THEN . DObjCntr(WchObj) = MarkedObjCntr
END SUB
SUB MrkScaffoldCntr (MessageS, WchObj, WchPose)
DIM UnιObjCntr(O) AS t3DPo t
DefnPt UnιObjCntr(O) , Messages, "MrkScaffoldCntr", 3
IF WchPose > 1 THEN
Mrk 3, 1 'removes mrk put on by defnpt from screen
UmOb Cntr(O) -Z = ZPlane
XYZ = UniObjCntr(O)
Mrk 2, 1 END IF
SELECT CASE WchPose
CASE 1: AScaffoldCntrd) = UniObjCntr(0)
ZPlane = UniObjCntr(0) -Z CASE 2: BScaffoldCntrd) = UniObjCntr(0)
ImDrawmgCentrDisp(2) -x = BScaffoldCntr(l) .x - AScaffoldCntrd) .x
ImDrawιngCentrDιsp(2) -y = BScaffoldCntr(l) .y - AScaffoldCntrd) .y
ImDrawιngCentrDιsp(2) .Z = BScaffoldCntrd) .Z - AScaffoldCntr(1) .Z CASE 3: CScaffoldCntrd) = UniObjCnt (0)
ImDrawmgCentrDιsp(3) .x = CScaffoldCntrd)
ImDrawingCentrDispO) .y = CScaffoldCntrd)
ImDrawmgCentrDisp(3) . = CScaffoldCntrd) CASE 4: DSeaffoldCntr(1) = UniObjCntr(0)
ImDrawmgCentrDisp(4) -x = DSeaffoldCntr(1)
ImDrawmgCentrDisp(4) .y = DSeaffoldCntr(1)
Figure imgf000140_0001
ImDrawmgCentrDisp(4) .Z = DScaffoldCntr(1).Z - AScaffoldCntrd) -Z END SELECT
LOCATE 4, 1: PRINT SPACES(45) END SUB
SUB MrkScaffoldPts
DIM ADιspPt(O) AS t3DPomt
Messages = "Mark Scaffold RefPoints; <Done> If Finished, Or No Pts
Wanted" ScaffoldPtlndex = 0 AnsS = "" DO UNTIL AnsS = C$
DefnPt ADιspPt(O) , MessageS, "DefnScaffoldPts", 2
ScaffoldPtlndex = ScaffoldPtlndex + 1
ScaffoldDisp(ScaffoldPtlndex) -x = AScaffoldCntrd) .x - ADispPt(0) .x
ScaffoldDisp(ScaffoldPtlndex) .y = AScaffoldCntrd) .y - ADιspPt(O) .y
ScaffoldDisp(ScaffoldPtlndex) -Z = AScaffoldCntr(1).Z - ADispPt(0).Z
NoOfScaffoldPts = ScaffoldPtlndex LOOP IF AnsS = CS THEN
NoOfScaffoldPts = NoOfScaffoldPts - 1
LOCATE 5, 1: PRINT SPACES(75) END IF END SUB
SUB MrkVisInvisLine
CLS
ShowAllFnlSegs 1
Finished = False
DO WHILE Finished = False
SELECT CASE UserChoice("" , "", "ChooseLine" , "Finished", "", "") CASE 2
FindMrkdPtlnAPose ThisOne, "Mark The Line" WchLine = FindAlnForlntermit(ThisOne) INPUT "Appears At Frame"; ALns(WchLine) .StartVis INPUT "Disappears At Frame"; ALns(WchLine) .EndVis CASE 3 EXIT DO END SELECT LOOP CLS END SUB
SUB MtchPtsPartl
NoOfMtchPts = 0
OneSetChosen = False
DoneMtchPts = False
LOCATE 4, 1: PRINT "Reminder: Make MatchPts At Location Of
Future Velcro Pts, If Any" PRINT "Don't Put MatchPt Near Start Or End Of A Line!" SLEEP 3
FOR WchLine = 1 TO NoOfLines CLS
ShowLn 1, WchLine, -1 WchPose = 1 FOR q = 1 TO NoOfMtchPts - 1
IF MtchPts(q, 7) = WchLine THEN
XYZ.x = GetAReal! (APtsXPg + 3 * (WchPose - 1), MtchPts(q, WchPose)) XYZ.y = GetAReal! (APtsYPg + 3 ' (WchPose - 1),
MtchPts(q, WchPose) ) XYZ.Z = GetAReal! (APtsZPg + 3 * (WchPose - 1),
MtchPts(q, WchPose) ) Mrk 0, 1 END IF NEXT
LOCATE 2, 1: PRINT "Avail MatchPts ="; 50 - NoOfMtchPts: SLEEP 1 WHILE Confirm!"Make (More) MatchPts On This Line?")
NoOfMtchPts = NoOfMtchPts + 1
AbortMatchPt = False
FOR WchPose = 1 TO 4
CLS 'show existing mtchpts
ShowLn WchPose, WchLine, -1 FOR q = 1 TO NoOfMtchPts - 1
IF MtchPts(q, 7) = WchLine THEN
XYZ.x = GetAReal! (APtsXPg + 3 * (WchPose - 1),
MtchPts(q, WchPose)) XYZ.y = GetAReal! (APtsYPg + 3 * (WchPose - 1),
MtchPts(q, WchPose) ) XYZ.Z = GetAReal! (APtsZPg + 3 * (WchPose - 1),
MtchPts( , WchPose) ) Mrk 0, 1 END IF NEXT
MtchPtsPart2 WchPose, NoOfMtchPts IF AbortMatchPt = True THEN NoOfMtchPts = NoOfMtchPts - 1 CLS
ShowLn 1, WchLine, -1 EXIT FOR END IF NEXT 'next pose
CLS
LOCATE 2, 1: PRINT "Avail MatchPts ="; 50 - NoOfMtchPts: SLEEP 1 ShowLn 1, WchLine, -1 FOR q = 1 TO NoOfMtchPts
IF MtchPts(q, 7) = WchLine THEN XYZ.x = GetAReal! (APtsXPg + 3 XYZ.y = GetAReal! (APtsYPg + 3 XYZ.Z = GetAReal! (APtsZPg + 3
Figure imgf000142_0001
Mrk 0, 1 END IF NEXT
WEND 'make more on same line NEXT 'next line
END SUB
SUB MtchPtsPart2 (WchPose, MtchPtNdx) I = WchPose SELECT CASE I CASE 1
IF OneSetChosen THEN
IF 50 - MtchPtNdx < 2 THEN BEEP: BEEP: BEEP PRINT "Last Avl Match Pt!" END IF ELSE
LOCATE 2, 1 PRINT "Mrk Match Pt in A Image" END IF CASE 2 LOCATE 2, 1 PRINT "Mrk Matching Pt in B Image CASE 3. LOCATE 2, 1 PRINT "Mrk Matching Pt in C Image CASE 4 LOCATE 2, 1 PRINT "Mrk Matching Pt in D Image END SELECT LnNo = WchLine - 1 WchPoseForHili = 2 ShowGuideMatchPts I MtchPtsPart3 I, MtchPtNdx END SUB
SUB MtchPtsPart3 (WchPose, MtchPtNdx) Foundlt = False MaybeMore:
AS = Erase" CS = "AbortPt" BS = "Good"- DS = "Adj"
WndChs "", AS, BS, CS, DS, 'x AnsS, 1
DO
Wndln
ShowCrsr
IF XYZ.y < 15 THEN
WndSlct AnsS, 1 SELECT CASE AnsS CASE AS erase XYZ = FoundPt Mrk 0, 1 Foundlt = False CASE B$ 'good
IF Foundlt = True THEN EXIT DO CASE ES 'alldone
IF WchPose = 1 AND OneSetChosen = True THEN DoneMtchPts = True EXIT DO END IF
Figure imgf000143_0001
IF Foundlt = True THEN
Ad MtchPt WchPose, WchLine, MtchPtNdx GOTO MaybeMore END IF CASE CS 'abort
BEEP: BEEP
LOCATE 6, 1- PRINT "ABORTING THIS MATCH POINT' SLEEP 1 LOCATE 6, 1 PRINT SPACES(45) AbortMatchPt = True EXIT DO END SELECT END IF
IF INP(889) < 128 AND Foundlt = False THEN F dDesPt WchPose, WchLine IF Foundlt = True THEN SOUND 50, 3 Mrk 0, 1 MtchPts (MtchPtNdx, WchPose) = ThisOne
MtchPts(MtchPtNdx, 5) = ALns(WchLine) .WchGrp MtchPts(MtchPtNd , 6) = ALns(WchLine) WchObj MtchPts(MtchPtNdx, 7) = WchLine END IF
IF WchPose = 1 AND Foundlt = True THEN AtLeastOneChosen = True get order of mtchpts in ALn:
ALnPlaceNdx = 0
FOR q = 1 TO MtchPtNdx
IF MtchPts(q, 7) = WchLine THEN ALnPlaceNdx = ALnPlaceNdx + 1 ALnPlace(ALnPlaceNdx, 0) = q 'which mtchpt ALnPlace(ALnPlaceNdx, 1) = MtchPts(q, 1) 'APose pt END IF NEXT
'sort according to pt position: FOR J = 1 TO ALnPlaceNdx - 1 FOR I = 1 TO ALnPlaceNdx - J
IF ALnPlace(I, 1) > ALnPlace(I + 1, 1) THEN SWAP ALnPlaceϋ, 0), ALnPlaced + 1, 0) SWAP ALnPlace(I, 1), ALnPlaced + 1, 1) END IF NEXT I NEXT END IF IF WchPose > 1 AND Foundlt = True THEN
'sort mtchpts for this Pose and compare with ALn 'if not same order it's no good
OtherLnPlaceNdx = 0 FOR q = 1 TO MtchPtNdx
IF MtchPts(q, 7) = WchLine THEN
OtherLnPlaceNdx = OtherLnPlaceNdx + 1 OtherLnPlace(OtherLnPlaceNdx, 0) = q 'which mtchpt OtherLnPlace(OtherLnPlaceNdx, 1) = MtchPts(q, WchPose) END IF NEXT
'sort according to pt position: FOR J = 1 TO OtherLnPlaceNdx - 1 FOR I = 1 TO OtherLnPlaceNdx - J
IF OtherLnPlace(I, 1) > OtherLnPlace(I + 1, SWAP OtherLnPlace(I, 0) , OtherLnPlace(I + SWAP OtherLnPlace(I, 1) , OtherLnPlace(I +
Figure imgf000144_0001
END IF NEXT I NEXT
FOR I = 1 TO OtherLnPlaceNdx
IF OtherLnPlace(I, 0) <> ALnPlace , 0) THEN LOCATE 6, 1: BEEP PRINT "Erased —Not In Correct Order. Maybe Line Direction
Is Reversed. " PRINT "If So, Quit MatchPts And Reverse Line) Else Do
MatchPt Again" SLEEP 4
LOCATE 6, 1: PRINT SPACES(65) LOCATE 7, 1: PRINT SPACES(65) Foundlt = False Mrk 0, 1 EXIT FOR END IF NEXT END IF
AtLeastOneChosen = True IF WchPose = 4 THEN OneSetChosen = True END IF LOOP END SUB
SUB MyDelay (HowLong) FOR q = 1 TO 200
FOR I = 1 TO HowLong * 3000: NEXT I NEXT END SUB
SUB NameGroups
FOR I = 1 TO NoOfGroups
CLS
FOR J = 1 TO NoOfLines
IF ALns(J) .WchGrp = I THEN ShowLn 1, J, -1
NEXT
INPUT "Name For This"; NameS
Group(I) .Label = UCASES(NameS) NEXT
GroupsNamed = True IF NoOfGroups = 1 THEN
Object(1) -Label = UCASES(NameS)
ObjectNamed = True END IF END SUB
SUB NameObjects FOR I = 1 TO NoOfObjects GroupsInThisObj = 0 FOR J = 1 TO NoOfGroups
IF Group(J) .WchObj = I THEN
GroupsInThisObj = GroupsInThisObj + 1 WchGrpInThisObj = J END IF NEXT IF GroupsInThisObj = 1 THEN
Object(I) -Label = Group(WchGrpInThisObj) .Label ELSE CLS
ShowObj I, 1
INPUT "Name For This Object"; NameS Object(I) .Label = UCASES( ameS) END IF NEXT
ObjectsNamed = True END SUB
SUB NameWarps
CLS
Warplndex = 0
LOCATE 2, 1: PRINT "TO FINISH HIT <Enter>"
DO
FOR I = 1 TO Warplndex LOCATE 1 + 5 : PRINT "Warp No" ; I ; Warp ( I ) . Label NEXT
Warplndex = Warplndex + 1
LOCATE 4 , 1 : INPUT "Warp Name" ; NameS
LOCATE 4 , 1 : PRINT SPACES ( 65 )
IF NameS = " " THEN
Warplndex = Warplndex - 1 EXIT DO
END IF
Warp(Warplndex) -Label = UCASES(NameS)
FOR I = 1 TO Warplndex
LOCATE 1 + 5: PRINT "Warp No"; I; Warp(I).Label
NEXT
PRINT "Remaining Warps Available : " ; 6 - Warplndex LOOP
NoOfWarps = Warplndex CLS FOR I = 1 TO Warplndex
LOCATE 1 + 5 : PRINT "Warp No" ; I ; Warp d ) - Label NEXT
END SUB
SUB NoMtchPts
FOR I = 1 TO NoOfLines
TeπpSegs(I) .AStartPt = ALnsd) -Beg
TempSegs(I) .AEndPt = ALnsd) -Fin
TempSegs(I) .BStartPt = BLns(I) .Beg
TempSegs(I) .BEndPt = BLns(I) .Fin
TeπpSegs(I) .CStartPt = CLns(I) .Beg
TempSegs(I) .CEndPt = CLns(I) .Fin
TempSegs(I) . StartPt = DLns(I) .Beg
TempSegs(I) .DEndPt = DLns(I) .Fin
TempSegs(I) . chGrp = ALns(I) .WchGrp
TempSegs(I).WchObj = ALns(I).WchObj
TempSegs(I) .WchLine = I NEXT
NoOfSegs = NoOfLines AllMtchPtsOK = True END SUB
SUB OldSmooth (RuffPtsO AS t3DPoint, SmoothPts() AS t3DPoint,
SmoothRange) PtLimit = RuffPts(0).x IF PtLimit < SmoothRange + 1 THEN SmoothRange = PtLimit - 1 IF SmoothRange < 0 THEN SmoothRange = 0 END IF
TotalRange = 2 * SmoothRange + 1 FOR 1 = 1 + SmoothRange TO PtLimit - SmoothRange xsum! = 0: ysum! = 0: zsum! = 0 FOR J = I - SmoothRange TO I + SmoothRange xsum! = xsum! + RuffPts(J).x ysum! = ysirr.! + RuffPts(J).y zsum! = zsirr.! + RuffPts(J).Z NEXT J SmoothPts(I) .x = xsum! / TotalRange SmoothPts(I) -y = ysum1 / TotalRange
SmoothPts(I).Z = zsum' / TotalRange NEXT I FOR I = 0 TO SmoothRange 'puts in pts at start
SmoothPts(I) = RuffPts(I) NEXT I FOR I = PtLimit - SmoothRange TO PtLimit 'puts in end pts
SmoothPts(I) = RuffPts(I) NEXT I END SUB
SUB PaintLoop
PRINT "will be paint Loop"
SLEEP 1 END SUB
SUB PathAd
PathToAdj = UserChoice("Adj Path For Which Object" Object(1) .Label, Object(2) .Label, Object(3) .Label, " "") Ad PathAlongXYZ PathToAdj END SUB
SUB PathArrayPositPtr (FrameNo, WchPath, ObjPathPos AS t3DPomt)
ObjPathPos.x = GetAReal! (PathlXPg + 3 (WchPath - 1), FrameNo)
Ob PathPos.y = GetAReal! (PathlYPg + 3 (WchPath - 1), FrameNo)
ObjPathPoε.Z = GetAReal!(PathlZPg + 3 (WchPath - 1), FrameNo) END SUB
SUB PathShiftToMatchPrevRun (WchObj) DIM DifflnPosit AS t3DPomt SELECT CASE WchObj CASE 1
DifflnPosit.x = ObjFmalPositions(1) .FmalPositObjl.x
GetAReal' (TempPtsXPg, 1) DifflnPosit.y = ObjFmalPositions(1) .FmalPositObjl.y
GetAReal' (TempPtsYPg, 1) DifflnPosit.Z = ObjFmalPositions (1) .FmalPositObjl.Z GetAReal' (TempPtsZPg, 1) CASE 2
DifflnPosit.x = ObjFmalPositions(1) .FιnalPosιtObj2.x
GetAReal' (TempPtsXPg, 1) DifflnPosit.y = ObjFmalPositions(1) .FιnalPosιtObj2.y
GetAReal' (TeπpPtsYPg, 1) DifflnPosit.Z = ObjFmalPositions (1) .FιnalPos tObj2.Z GetAReal! (TempPtsZPg, 1) CASE 3
DifflnPosit.x = ObjFmalPositions(1) -FιnalPosιtObj3.x
GetAReal! (TempPtsXPg, 1) DifflnPosit.y = ObjFmalPositions(1) .FmalPosit0bj3.y
GetAReal! (TeπpPtsYPg, 1) DifflnPosit.Z = ObjFmalPositions(1) .FinalPosιt0bj3.Z GetAReal' (TempPtsZPg, 1) END SELECT FOR I = 1 TO GetA(TeπpPtsXPg, 0)
SetArrayReal TeπpPtsXPg, I, GetAReal' (TeπpPtsXPg, I) DifflnPosit.x SetArrayReal TempPtsYPg, I, GetAReal' (TeπpPtsYPg, I) DifflnPosit.y SetArrayReal TempPtsZPg, I, GetAReal! (TempPtsZPg, I) DifflnPosit.Z NEXT
LOCATE 4, 1. PRINT "Shifting Path To Match Start To End Of Previous Run" SLEEP 1
LOCATE 4, 1. PRINT SPACES(75)
END SUB
SUB PlaceFnr hrtSyncPtsOnPath (Kind, WchNo) SortSyncPtsForApplic Kind, WchNo SELECT CASE Kind
CASE 1. ScanSyncPtsName = eScanForObjPathSyncPt CASE 2: ScanSyncPtsName = eScanForTransSyncPt CASE 3: ScanSyncPtsName = eScanForWarpSyncPt END SELECT
FOR I = 2 TO NoOfSortedSyncPts - 1 'leaves out start and end IF Kind = 1 THEN
WchPath = Object(Group(WchGrp) WchOb ).PathNo IF WchPath = 1 THEN ShowObjPath PathlXPg, 1 IF WchPath = 2 THEN ShowObjPath Path2XPg, 1 IF WchPath = 3 THEN ShowObjPath Path3XPg, 1 END IF LOCATE 3, 1
PRINT "MARK LOCATION FOR SYNC PT "; SortedSyncPts(I). abel Foundlt = False DO WHILE Foundlt = False
WndPtScan WchObj, Obj2, WchGrp, Grp2, TeπpPtsXPg, GetA(TeπpPtsXPg, 0), 1, ScanSyncPtsName IF Foundlt = True THEN MyDelay 1
SortedSyncPts(I) .TempPtslndex = ThisOne SOUND 4000, 3 EXIT DO END IF LOOP
LOCATE 5, 1
PRINT "Marked So Far:" LOCATE 4 + 1
PRINT SortedSyncPts(I).Label, " At TempPt"; ThisOne; " Frm", SortedSyncPts (I) .Frame
NEXT END SUB
SUB PlaceSyncPtsOnFrmChrt (Kind, WchOne, TextS)
CLS
Range = 3
SyncPtlndexAtStartOfFrmChrt = SyncPtlndex
MkFrameScreenV4 Kind, WchOne
ShowSyncPtLines SyncPtlndexAtStartOfFrmChrt
DO
Wndln
CalcFlatXY
ShowFlatCrsr
IF XYZ.y < 15 THEN WndSlct AnsS, 1
Foundlt = False
LOCATE 2, 1: PRINT "Place Desired Sync Pt "
DO WHILE Foundlt = False
FindFrmlnChartOb GrpWarp Kind, WchOne, WchFrame
XLocat = XYZ.x
SyncPtlndex = SyncPtlndex + 1 syncpts(SyncPtlndex) .Frame = WchFrame LOOP
UsingExistSyncPt = False
XPos = 40 + interval' * (WchFrame - 1)
YPos = 70
Height = 34
LINE (XPos, YPos)-(XPos, YPos + Height), 14
SELECT CASE Kind
CASE 1. syncpts(SyncPtlndex) .WchObj = WchOne CASE 2: syncpts(SyncPtlndex) WchGrp = WchOne CASE 3- syncpts(SyncPtlndex) WchWrp = WchOne END SELECT
FOR q = 1 TO SyncPtlndex - 1 'becuz last syncpt has ust been put on IF syncpts(q) Frame = WchFrame THEN syncpts (SyncPtlndex) .Label = syncpts(q) -Label syncpts (SyncPtlndex) .TempPtslndex = syncpts(q) TempPtslndex ShowSyncPtLines SyncPtlndexAtStartOfFrmChrt
LOCATE 1, 1 PRINT "Using Existing Name " MyDelay
UsingExistSyncPt = True END IF
NEXT
IF UsingExistSyncPt = False THEN
LOCATE 1, 1. INPUT "Name For This SyncPt ', TextS syncpts(SyncPtlndex) .Label = STRS(WchFrame) + '- + UCASES(TextS) ShowSyncPtLines SyncPtlndexAtStartOfFrmChrt
END IF
LOCATE 1, 1: PRINT SPACES(75)
CS = "More" : DS = "Finished"
WndChs "", "x", "x", CS, DS, "x", AnsS, 0
LOCATE 1, 1 PRINT SPACES(75)
LOCATE 2, 1 PRINT SPACES(75)
IF AnsS = D$ THEN EXIT DO ShowSyncPtLines SyncPtlndexAtStartOfFrmChrt. SLEEP 1 LOOP CLS END SUB
SUB PlaceSyncPtsOnTempPath (Kind, WhichOne, PathTextS) SyncPtlndexSoFar = SyncPtlndex LOCATE 1, 1. PRINT PathTextS SELECT CASE Kind
CASE 1- ScanSyncPtsName = eScanForObjP thSyncPt CASE 2 ScanSyncPtsName = eScanForTransSyncPt CASE 3: ScanSyncPtsName = eScanForWarpSyncPt END SELECT SyncPtsOK = False WHILE NOT SyncPtsOK DO
ErsMnu
SELECT CASE UserChoice("MARK SYNC POINT (Touch <Mark> First)",
"", "Mark", "", "", "Finished") CASE 5
EXIT DO CASE 2
WndPtScan WchObj, Obj2, WchGrp, Grp2, TeπpPtsXPg, - 14$
GetA(TeπpPtsXPg, 0) , 1, eScanForObjPathSyncPt SOUND 4000, 2 END SELECT
SyncPtlndex = SyncPtlndex + 1 syncpts (SyncPtlndex) .TempPtslndex = ThisOne syncpts(SyncPtlndex) .Frame =
CINT((syncpts(SyncPtlndex) .TempPtslndex / GetA(TempPtsXPg, 0)) * NoOfFrames)
IF Kind = 1 THEN syncpts (SyncPtlndex) .WchObj = WhichOne END IF IF Kind = 2 THEN syncpts(SyncPtlndex) .WchGrp = WhichOne END IF IF Kind = 3 THEN syncpts (SyncPtlndex) .WchWrp = WhichOne END IF
LOCATE 1, 1
INPUT "Name For This Sync Pt " ; NameS
LOCATE 1, 1: PRINT SPACES(79) syncpts(SyncPtlndex) .Label = STR$(syncpts (SyncPtlndex) .Frame) -
"-" + UCASES(NameS) IF SyncPtlndex > 0 THEN LOCATE 5, 1 PRINT "Marked So Far: "
FOR T = SyncPtlndexSoFar + 1 TO SyncPtlndex IF T > 0 THEN PRINT syncpts(T) .Label; " At TempPt"; syncpts(T) .TempPtslndex; " Frm"; syncpts(T) .Frame NEXT END IF
LOOP
IF Confirm!"SyncPtsOK") THEN
SyncPtsOK = True ELSE
SyncPtlndex = SyncPtlndexSoFar CLS
DrawPartialArray TempPtsXPg, 1, GetA(TeπpPtsXPg, 0), -1, False END IF WEND END SUB
SUB PutDrwMnuOnScrn (TextS, WchPose, Version) 'Version 0 is when drawing, 1 when finished ErsMnu
IF Scaffold = True THEN A$ = "TogglScaff" ELSE AS = "x" IF WchPose = 1 THEN B$ = "Line Color" ELSE BS = "UsePrevLn" IF LnNo > 0 THEN DS = "Del Last" ELSE DS = "x" IF WchPose = 1 THEN ES = "x" ELSE ES = "Rpt A Pose" SELECT CASE WchPose CASE 1
A$ = "Name Line"
IF FrstLn = True THEN CS = "Finished A" ELSE C$ = "x"
WndChs TextS, A$, BS, C$, D$, E$, AnsS, 1 CASE 2
IF Version = 0 THEN CS = "x"
IF Version = 1 THEN C$ = "Finished B": BS = "x" ■ E$ = "x"
WndChs TextS, A$, B$, CS, D$, E$, AnsS, 1 CASE 3
IF Version = 0 THEN CS = "x"
IF Version = 1 THEN CS = "Finished C" BS = "x" ES = x"
WndChs TextS, AS, B$, C$, D$, ES, AnsS, 1
CASE 4
IF Version = 0 THEN CS = "x"
IF Version = 1 THEN C$ = 'Finished D" B$ = "x" ES = "x"
WndChs TextS, A$, B$, C$, D$, E$, AnsS, 1
END SELECT
IF Version = 0 AND WchPose = 1 THEN LOCATE 2, 1
PRINT "DRAW < + CHR$(64 + WchPose) + "> SOURCE POSE" END IF
IF Version = 0 AND WchPose > 1 THEN LOCATE 2, 1
PRINT "DRAW CORRESPONDING LINE " + ALns(LnNo).Label + " IN <' + CHRSI64 + WchPose) + "> SOURCE POSE" END IF
IF Versior = 1 THEN LOCATE 2, 1 PRINT SPACES(50) END SUB
SUB PutlnGrp (WchLine, WchGrp)
ALns(WchLine) WchGrp = WchGrp
BLns(WchLine) WchGrp = WchGrp
CLns(WchLine) WchGrp = WchGrp
DLns(WchLine) WchGrp = WchGrp
IF NoOfGroups < WchGrp THEN NoOfGroups = WchGrp
END SUB
SUB PutlnOb (WchGrp, WchObj) FOR K = 1 TO NoOfLines
IF ALns(K) WchGrp = WchGrp THEN
ALns(K) .WchObj = WchObj
BLns(K) .WchObj = WchObj
CLns(K) Wcr.Obj = WchObj
DLns(K) .WchObj = WchObj
Group(WchGrp) .WchObj = WchObj END IF NEXT
IF NoOfObjects < WchObj THEN NoOfObjects = WchObj END SUB
SUB ReCntrGrp (WchGrp, PtArray, CenterOfGrp() AS t3DPomt) DIM Dιsp(0) AS t3DPoιnt
Dιsp(O) x = CenterOfGrp(WchGrp) .x - AGrpCntr(WchGrp) x Dιsp(0) y = CenterOfGrp(WchGrp) y - AGrpCntr(WchGrp) y Dιsp(0).Z = CenterOfGrp(WchGrp) .Z - AGrpCntr(WchGrp) Z FOR J = 1 TO NoOfSegs
IF FinlSgs(J, WchGrp = WchGrp THEN
FOR I = FmlSgs(J) .Beg TO FinlSgs(J) .F
SetArrayReal PtArray, I, GetAReal' (PtArray, I) - Dιsp(O) .x SetArrayReal PtArray+1, I, GetAReal! (PtArray+1, I) - Dιsp(0) y SetArrayReal PtArray+2, I, GetAReal'(PtArray*2, I) - Dιsp(O) Z NEXT END IF NEXT
END SUB SUB ReCntrObj (WchObj, PtArray, CenterOfObj O AS t3DPoιnt) DIM Dιsp(0) AS t3DPoιnt
Dιsp(0) -x = CenterOfObj (WchObj) x - AObjCntr(WchObj) -x Dιsp(0).y = CenterOfObj (WchObj) y - AObjCntr(WchObj) y Dιsp(O) -Z = CenterOfObj (WchOb ) Z - AObjCntr(WchObj) -Z FOR J = 1 TO NoOfSegs
IF FinlSgs(J) .WchObj = WchObj THEN
FOR I = FinlSgs(J) .Beg TO FinlSgs(J) Fm
SetArrayReal PtArray, I, GetAReal'(PtArray, I) - Dιsp(0) x SetArrayReal PtArray+1, I, GetAReal' (PtArray+1, I) - Dιsp(0) y SetArrayReal PtArray+2, I, GetAReal' (PtArray+2, I) - Dιsp(O) Z NEXT END IF NEXT END SUB
SUB ScanPoseTrans (ForWhat, WchGrp, WchObjPath FrameNo)
'scans tetra space by wand position and
'shows resulting group transform in a path position according to path and 'which frame has been set (or in a static position if group is static)
DIM ObjCntr AS t3DPoιnt DIM Disp AS t3DPoιnt DIM Pt AS t3DPoιnt
ErsMnu
LOCATE 1, 1
IF ForWhat = 0 THEN PRINT "Explore Possible Action Available
For ", Group(WchGrp) Label, (click to exit)" SetupTetra
ZCorrection = 40 LensFocalLength = 35
SetA FastWorkArraylXPg + 3 - BuildToggle, 0, 0 'Inhibit initial erase DO
Wndln
ShowCrsr
IF ForWhat <> 0 THEN IF XYZ.y < 15 THEN WndSlct AnsS, 1 SELECT CASE AnsS CASE BS
FrameNo = FrameNo - 1 CASE CS
FrameNo = FrameNo + 1 END SELECT END IF END IF
IF FrameNo > NoOfFrames THEN FrameNo = NoOfFrames IF FrameNo < 1 THEN FrameNo = 1
Ndx = 0
IF CalcTProps(0) THEN '0 is fake frame no; uses XYZ from Wand Position FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchGrp = WchGrp THEN StartPt = FinlSgs(SegNo) .Beg EndPt = FinlSgs(SegNo! .F Grp = FinlSgs(SegNo) .WchGrp
IF ForWhat = 0 OR ForWhat = 2 THEN
ObjPathPosit.x = AObjCntr(ObjNo) .x
Ob PathPosit.y = AObjCntr(ObjNo) .y
ObjPathPosit.Z = AObjCntr(Obj o) .Z END IF
IF ForWhat = 1 THEN 'if exploring Poses there is no path yet PathArrayPositPtr FrameNo, WchObjPath, ObjPathPosit
Disp.x = ObjPathPosit.x - AObjCntr(WchOb ) .x
Disp.y = ObjPathPosit.y - AObjCntr(WchObj) .y
Disp.Z = ObjPathPosit.Z - AObjCntr(WchObj) .Z END IF
NegZ1 = AObjCntr(ObjNo) -Z / ZDivisor ZCorrection PFac' = LensFocalLength / NegZ!
FOR PtNo = StartPt TO EndPt STEP INT(GetA(APtsXPg, 0) / 150) + 1
Pt.x = TransGrfVal(0) .PropA * GetAReal' (APtsXPg, PtNo) + TransGrfVal(0) PropB * GetAReal' (BPtsXPg, PtNo) + TransGrfVal(0) .PropC * GetAReal' (CPtsXPg, PtNo) + TransGrfVal(0) ,PropD * GetAReal' (DPtsXPg, PtNo) + Disp.x
Pt.y = TransGrfVal(0) PropA * GetAReal' (APtsYPg, PtNo) + TransGrfVal(0) PropB * GetAReal' (BPtsYPg, PtNo) + TransGrfVal(0) PropC * GetAReal' (CPtsYPg, PtNo) + TransGrfVal(0) PropD * GetAReal' (DPtsYPg, PtNo) +
Figure imgf000153_0001
Pt.Z = TransGrfVal(0) . PropA * GetAReal' (APtsZPg, PtNo) + TransGrfVal(0) PropB * GetAReal' (BPtsZPg, PtNo) + TransGrfVal (0) . PropC * GetAReal ' (CPtsZPg, PtNo) + TransGrfVal(0) PropD * GetAReal' (DPtsZPg, PtNo) + Disp.Z
IF WhatFor = 1 OR WhatFor = 2 THEN
Pt.x = ObjPathPosit.x - (PFac1 * (Pt.x - ObjPathPosit.x))
Pt.y = Ob PathPosit.y - (PFaC * (Pt.y - ObjPathPosit.y))
Pt.Z = ObjPathPosit.Z - (PFaC * (Pt.Z - ObjPathPosit.Z))
END IF
Ndx = Ndx + 1
SetArrayReal FastWorkArraylXPg + gBuildToggle, Ndx, Pt.x SetArrayReal FastWorkArraylYPg + gBuildToggle, Ndx, Pt.y SetArrayReal FastWorkArraylZPg + gBuildToggle, Ndx, Pt.Z NEXT 'point along the seg END IF NEXT ' (seg) END IF
SetA FastWorkArraylXPg + gBuildToggle, 0, Ndx ShowCrsr
DrawArray FastWorkArraylXPg + 3 - gBuildToggle, 0, False IF INP(889) < 128 THEN EXIT DO gBuildToggle = 3 - gBuildToggle DrawArray FastWorkArraylXPg gBuildToggle, -1, False LOOP
LOCATE 12, 1: PRINT SPACES (55) END SUB
SUB SetA (PageNo, Index, Value) SetArray PageNo, Index, Value END SUB
SUB SetUpGlueLoops
BS = "No": CS = "CnfirmEach" : D$ = "Automatic" WndChs "Glue Loops For Later Painting?", "x", BS, C$, DS, "x", AnsS, 0 SELECT CASE AnsS
CASE B$: MkLineLoopS = BS
CASE C$: MkLineLoopS = CS
CASE DS: MkLineLoopS = D$ END SELECT
GlueLoops = (MkLineLoopS = C$ OR MkLineLoopS = D$) END SUB
Figure imgf000154_0001
SUB ShiftPathOneFrame (WchPath)
END SUB
SUB ShortCutGroups
NoOfLines = ALns(O) -Beg IF NoOfLines = 1 THEN
ALnsd) .WchGrp = 1: BLns(1) -WchGrp = 1 CLns(1) .WchGrp = 1: DLns(1).WchGrp = 1 NoOfGroups = 1 GroupsDefnd = True END IF END SUB
SUB ShortCutObjects IF NoOfGroups = 1 THEN FOR I = 1 TO NoOfLines
ALns(I) .WchObj = 1. BLns(I) WchObj = 1 CLns(I) .WchObj = 1: DLns(I) .WchObj = 1 NEXT
Group(1) WchObj = 1 NoOfObjects = 1 ObjectsDefnd = True END IF END SUB
SUB ShowAllFnlSegs (WchPose) FOR I = 1 TO NoOfLines SELECT CASE WchPose CASE 1
ShowFnlSegs APtsXPg, I, -1 CASE 2
ShowFnlSegs BPtsXPg, I, -1 CASE 3
ShowFnlSegs CPtsXPg, I -1 CASE 4
ShowFnlSegs DPtsXPg, I, -1 END SELECT NEXT END SUB
SUB ShowAllSegStarts FOR I = 1 TO NoOfSegs
GetXYZ FinlSgs(I) .Beg
Mrk 0, 1 NEXT END SUB
SUB ShowASegStart (WchSeg)
A = FmlSgε(WchSeg) .Beg
B = FinlSgs(WchSeg) .Beg + 8
GetXYZ A
Mrk 0, 1
GetXYZ B
Mrk 2, 1
END SUB
SUB ShowCrsr
CalcLXRXY
PUT (LastMrkrPts.lx, LastMrkrPts.y), LCrsr
PUT (LastMrkrPts.rx, LastMrkrPts.y), RCrsr
PUT (MrkrPts.lx, MrkrPts.y), LCrsr
PUT (MrkrPts.rx, MrkrPts.y), RCrsr
LastMrkrPts = MrkrPts END SUB
SUB ShowFinalLn (WchPose, LnNo, ShowColor)
DrawPartialArray APtsXPg + 3 * (WchPose - 1), ALns(LnNo) .FinalStart,
ALns(LnNo) .FinalEnd, ShowColor, True END SUB
SUB ShowFlatCrsr CalcFlatXY CalcMrkrPts
PUT (LastMrkrPts.lx, LastMrkrPts.y) LCrsr
PUT (LastMrkrPts.rx, LastMrkrPts.y) RCrsr
PUT (MrkrPts.lx, MrkrPts.y), LCrsr
PUT (MrkrPts.rx, MrkrPts.y), RCrsr
LastMrkrPts = MrkrPts
END SUB
SUB ShowFlatPt (x, y, C)
PSET (x, y) , C END SUB
SUB ShowFnlSegs (WchArray, WchLn, ShowColor) FOR I = 1 TO NoOfSegs
IF F lSgs(I) .WchLine = WchLn THEN
DrawPartialArray WchArray, FinlSgs(I) -Beg, F lSgs(I) -Fin, ShowColor, False END IF NEXT END SUB
SUB ShowGroupTScript (WchGrp, Grp2, Scanlndex, IndexTypeS)
DIM Pt AS t3DPomt
'scans thru tetra space according to wand posit
'shows group where it was first drawn in A Pose
IF IndexTypeS = "Temp" THEN StartVis = 0: EndVis = 10000
Find total points to be drawn
TotalPoints = 0
FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchGrp = WchGrp THEN TotalPoιnts=TotalPomts t- F lSgs(SegNo) .Fin-F lSgs(SegNo) .Beg+1
END IF NEXT
Build up into toggled buffer area
Ndx = 0
IF CalcTProps (0) THEN 0 is frame no to put prop valε in, using XYZ from wand position in CalcTProps FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchGrp=WchGrp OR FinlSgs(SegNo) .WchGrp=Grp2 THEN IF IndexTypeS = "Frames" THEN
StartVis = ALns(FinlSgs(SegNo) -WchLme) .StartVis EndVis = ALns(FinlSgs(SegNo) .WchL e) .EndVis END IF
IF StartVis <= Scanlndex AND EndVis >= Scanlndex THEN FOR PtNo = FinlSgs(SegNo) .Beg TO FinlSgs(SegNo) .Fm STEP INTtTotalPomts / 150) + 1
Ndx = Ndx + 1
Pt.x = TransGrfVal(0).PropA GetAReal' (APtsXPg, PtNo TransGrfVal(0) .PropB GetAReal! (BPtsXPg, PtNo TransGrfVal(0) .PropC GetAReal' (CPtsXPg, PtNo TransGrfVal(0) .PropD GetAReal' (DPtsXPg, PtNo
Pt.y = TransGrfVal(0).PropA GetAReal' (APtsYPg, PtNo TransGrfVal(0) .PropB GetAReal' (BPtsYPg, PtNo TransGrfVal(0) .PropC GetAReal' (CPtsYPg, PtNo TransGrfVal(0) .PropD GetAReal! (DPtsYPg, PtNo
Pt.Z = TransGrfVal(0) .PropA GetAReal' (APtsZPg, PtNo TransGrfVal(0) PropB GetAReal' (BPtsZPg, PtNo TransGrfVal(0) .PropC GetAReal' (CPtsZPg, PtNo TransGrfVal(0) .PropD * GetAReal ' (DPtsZPg, PtNo) SetArrayReal FastWorkArraylXPg + gBuildToggle + 0, Ndx, Pt.x SetArrayReal FastWorkArraylXPg + gBuildToggle + 1, Ndx, Pt y SetArrayReal FastWorkArraylXPg + gBuildToggle + 2, Ndx, Pt.Z NEXT 'point along the seg END IF END IF NEXT END IF SetA FastWorkArraylXPg + gBuildToggle, 0, Ndx
. **•******.**«******••*•*••** undraw previous buffer and draw new one
DrawArray FastWorkArraylXPg + 3 - gBuildToggle, 0, False gBuildToggle = 3 - gBuildToggle
DrawArray FastWorkArraylXPg + 3 - gBuildToggle, -1, False
END SUB
SUB ShowGrp (WchPose, WchGrp, ShowColor) FOR I = 1 TO NoOfSegs
IF FinlSgs(I) WchGrp = WchGrp THEN SELECT CASE WchPose
CASE 1. WchArray = APtsXPg CASE 2. WchArray = BPtsXPg CASE 3: WchArray = CPtsXPg CASE 4. WchArray = DPtsXPg END SELECT
DrawPartialArray WchArray, FinlSgs(I) .Beg, FinlSgs(I) -Fm, ShowColor, False END IF NEXT
END SUB
SUB ShowGrpTranslnPathPosit (WchObj, WchGrp, Grp2, Index) DIM ObjCntr AS t3DPomt, Disp AS t3DPomt, Pt AS t3DPoιnt Path = Object(Group(WchGrp) .WchObj) .PathNo
PathArrayPositPtr Index, Path, ObjPathPosit TransPtr Index, WchGrp, AllProp
ZCorrection = 40 LensFocalLength = 35
NegZ' = ObjPathPosit.Z / ZDivisor - ZCorrection PFac! = LensFocalLength / NegZ'
Disp.x = ObjPathPosit.x - AObjCntr(WchObj) .x Disp.y = ObjPathPosit.y - AObjCntr(WchOb ) .y Disp.Z = ObjPathPosit.Z - AObjCntr(WchObj) .Z
. ****.*.****..*********..*.* Flnd to aι points to be drawn TotalPoints = 0 FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) . chGrp=WchGrp OR FinlSgs(SegNo) .WchGrp=Grp2 THEN TotalPomts = TotalPoints+FinlSgs(SegNo) .Fm-FinlSgs(SegNo) .Beg+1 END IF NEXT
. ..*...****.*....**...,.*.*. Bu ld up lnto toggled buffer area Ndx = 0 FOR SegNo = 1 TO NoOfSegs
IF FinlSgs (SegNo) .WchGrp = WchGrp THEN
IF ALns(FinlSgs(SegNo) WchLine) .StartVis <= Index AND ALns(FmlSgs(SegNo) WchLine) .EndVis >= Index THEN FOR PtNo = FinlSgs(SegNo) .Beg TO FinlSgs(SegNo) .Fin STEP INT(TotalPomts / 150) + 1 Ndx = Ndx + 1
Pt.x = AllProp.PropA * GetAReal' (APtsXPg, PtNo) +
AllProp.PropB * GetAReal' (BPtsXPg, PtNo) +
AllProp.PropC * GetAReal' (CPtsXPg, PtNo) +
AllProp.PropD * GetAReal' (DPtsXPg, PtNo) + Disp.x
Pt.y = AllProp.PropA * GetAReal' (APtsYPg, PtNo) +
AllProp.PropB * GetAReal' (BPtsYPg, PtNo) +
AllProp.PropC * GetAReal' (CPtsYPg, PtNo) +
AllProp PropD * GetAReal' (DPtsYPg, PtNo) + Disp.y
Pt.Z = AllProp.PropA * GetAReal' (APtsZPg, PtNo) +
AllProp PropB * GetAReal' (BPtsZPg, PtNo) +
AllProp PropC * GetAReal' (CPtsZPg, PtNo) +
AllProp.PropD * GetAReal' (DPtsZPg, PtNo) + Disp.Z
Pt.x = ObjPathPosit.x - (PFaC * (Pt.x ObjPathPosit.x) ) Pt.y = ObjPathPosit.y - (PFaC * (Pt y ObjPathPosit.y) ) Pt.Z = ObjPathPosit Z - (PFac' * (Pt.Z ObjPathPosit.Z) )
SetArrayReal FastWorkArraylXPg SetArrayReal FastWorkArraylXPg SetArrayReal FastWorkArraylXPg
Figure imgf000158_0001
NEXT 'point along the seg END IF END IF NEXT
TransPtr Index, Grp2, AllProp FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchGrp = Grp2 THEN
IF ALns(FinlSgs(SegNo) .WchLine) .StartVis <= Index AND ALns(FinlSgs(SegNo) .WchL e) .EndVis >= Index THEN FOR PtNo = FinlSgs(SegNo) .Beg TO FinlSgs(SegNo) .Fin STEP INTlTotalPoints / 150) + 1 Ndx = Ndx + 1
Pt.x = AllProp.PropA * GetAReal (APtsXPg, PtNo
AllProp.PropB * GetAReal (BPtsXPg, PtNo
AllProp.PropC * GetAReal (CPtsXPg, PtNo
AllProp.PropD * GetAReal (DPtsXPg, PtNo + Disp.x
Pt.y = AllProp.PropA * GetAReal (APtsYPg, PtNo
AllProp.PropB * GetAReal (BPtsYPg, PtNo
AllProp.PropC * GetAReal (CPtsYPg, PtNo
AllProp.PropD * GetAReal (DPtsYPg, PtNo + Disp y
Pt.Z = AllProp.PropA * GetAReal (APtsZPg, PtNo
AllProp.PropB * GetAReal (BPtsZPg, PtNo
AllProp.PropC * GetAReal (CPtsZPg, PtNo
AllProp.PropD * GetAReal (DPtsZPg, PtNo + Disp.Z
Pt .x = ObjPathPosit .x - (PFac ' (Pt.x - ObjPathPosit.x)) Pt .y = ObjPathPosit .y - (PFaC (Pt.y - ObjPathPosit.y)) Pt . Z = ObjPathPosit . Z - (PFac ' (Pt.Z - ObjPathPosit.Z)) SetArrayReal FastWorkArraylXPg + gBuildToggle 0 Nd , Pt.x SetArrayReal FastWorkArraylXPg + gBuildToggle 1, Ndx, Pt y SetArrayReal FastWorkArraylXPg + gBuildToggle 2, Ndx, Pt Z NEXT 'point along the seg END IF END IF
NEXT
SetA FastWorkArraylXPg + gBuildToggle, 0, Ndx
****** ...*«******.****.** rjncjraw previous buffer and draw new one DrawArray FastWorkArraylXPg + 3 - gBuildToggle, 0, False gBuildToggle = 3 - gBuildToggle
DrawArray FastWorkArraylXPg + 3 - gBuildToggle, -1, False END SUB
SUB ShowGuideLn (WchPose)
IF WchPose = 1 THEN ShowGuιdeLnPart2 BLns 0 , BPtsXPg, WchPose
IF WchPose = 2 THEN ShowGuιdeLnPart2 ALns() , APtsXPg, WchPose
IF WchPose = 3 THEN ShowGuιdeLnPart2 BLnsO , BPtsXPg, WchPose
IF WchPose = 4 THEN ShowGuιdeLnPart2 CLnsO, CPtsXPg, WchPose END SUB
SUB ShowGuιdeLnPart2 (LnArrayO AS LineType, PtArray, WchPose) IF ALns(O) .Beg <> 0 AND LnNo + 1 < ALns(O) .Beg + 1 THEN
HiLiLn LnArray() , PtArray, LnNo + 1 END IF END SUB
SUB ShowGuideMatchPts (WchPose)
IF WchPose = 1 THEN ShowGuιdeLnPart2 ALns() , APtsXPg, WchPose
IF WchPose = 2 THEN ShowGuιdeLnPart2 BLns , BPtsXPg, WchPose
IF WchPose = 3 THEN ShowGuιdeLnPart2 CLns!), CPtsXPg, WchPose
IF WchPose = 4 THEN ShowGuιdeLnPart2 DLns0 , DPtsXPg, WchPose
END SUB
SUB ShowLn (WchPose, LnNo, ShowColor) SELECT CASE WchPose
CASE 1
GetStartFmisn ALns() , LnNo, Start, Finish DrawPartialArray APtsXPg, Start, Finish, ShowColor, True
CASE 2
GetStartFinish BLns0 , LnNo, Start, Finish DrawPartialArray BPtsXPg, Start, Finish, ShowColor, True
CASE 3
GetStartFinish CLnsO , LnNo, Start, Finish DrawPartialArray CPtsXPg, Start, Finish, ShowColor, True
CASE 4
GetStartFinish DLnsO, LnNo, Start, Finish DrawPartialArray DPtsXPg, Start, Finish, ShowColor, True END SELECT
END SUB
SUB ShowObj (WchObject, WchPose) 'before lines turned into segs FOR I = 1 TO NoOfLines IF ALnsd) WchObj = WchObject THEN ShowLn WchPose, I, -1
END IF NEXT END SUB
SUB ShowObjectSegs (aObj, aPose, aColor, aUseLines) FOR I = 1 TO NoOfSegs
IF FmlSgs(I) -WchObj = aObj THEN
DrawPartialArray APtsXPg+3* (aPose-1) , F lSgs(I) .Beg, FmlSgs(I) .Fin, aColo , aUseLines END IF NEXT END SUB
SUB ShowObjOnPath (WchObj, Obj2, ObjPathPosit AS t3DPoιnt) DIM Pt AS t3DPoιnt
Simplified to show only A Pose
ZCorrection = 40
LensFocalLength = 35
NegZ' = ObjPathPosit.Z / ZDivisor - ZCorrection
PFac' = LensFocalLength / NegZ'
. *************..********.** plncj total points to be drawn
TotalPoints = 0
FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchObj = WchObj THEN
TotalPoints = TotalPoints+FmlSgs(SegNo) Fin-FinlSgs(SegNo) -Beg+1 END IF NEXT
, *..»**.*.***,.«..«**..***** BU1id up mtc toggled buffer area Ndx = 0 FOR SegNo = 1 TO NoOfSegs
IF FinlSgs(SegNo) .WchObj = WchObj THEN
FOR PtNo = FinlSgs(SegNo) .Beg TO FinlSgs(SegNo) .Fin STEP INT(TotalPoints / 150) + 1 Ndx = Ndx + 1
Pt.x = GetAReal1 (APtsXPg,PtNo)+ObjP thPosit.x-AObjCntr(WchObj) x Pt.y = GetAReal' (APtsYPg,PtNo)+ObjPathPosιt.y-AObjCntr(WchObj) y Pt.Z = GetAReal' (APtsZPg,PtNo)+ObjPathPosit-Z-AOb Cntr(WchObj) Z Pt.x = ObjPathPosit.x - (PFac * (Pt.x - Ob PathPosit.x)) Pt.y = ObjPathPosit.y - (PFaC * (Pt y - ObjPathPosit.y)) Pt.Z = ObjPathPosit.Z - (PFac' * (Pt.Z - ObjPathPosit.Z)) SetArrayReal FastWorkArraylXPg + gBuildToggle, Ndx, Pt.x SetArrayReal FastWorkArraylYPg + gBuildToggle, Ndx, Pt.y SetArrayReal FastWorkArraylZPg + gBuildToggle, Ndx, Pt.Z NEXT 'point along the seg END IF NEXT SetA FastWorkArraylXPg + gBuildToggle, 0, Ndx
, *••*.•*****.*,************•* undraw previous buffer and draw new one DrawArray FastWorkArraylXPg + 3 - gBuildToggle, 0, False gBuildToggle = 3 - gBuildToggle DrawArray FastWorkArraylXPg + 3 - gBuildToggle, -1, False END SUB
SUB ShowObjPath (Array, Visibility)
IF Visibility = 0 THEN LeftColor = 0: RightColor = 0
IF Visibility = 1 THEN LeftColor = LCol: RightColor = RCol
FOR I = 1 TO NoOfFrames 'shows object path EyeDisp = GetAReal! (Array + 2, I) / ZDivisor CIRCLE (GetAReal' (Array, I) - EyeDisp,
GetAReal' (Array + 1, I)), 2, LeftColor CIRCLE (GetAReal' (Array, I) + EyeDisp,
GetAReal' (Array + 1, I)), 2, RightColor FOR J = 1 TO NoOfSortedSyncPts
IF SortedSyncPts(J) .Frame = I THEN
CIRCLE (GetAReal! (Array, I) - EyeDisp,
GetAReal' (Array + 1, I)), 8, LeftColor CIRCLE (GetAReal! (Array, I) + EyeDisp,
GetAReal' (Array + 1, I)), 8, RightColor END IF NEXT NEXT END SUB
SUB ShowScaffold (WchPose) FOR I = 1 TO NoOfScaffoldPts SELECT CASE WchPose CASE 1 x = AScaffoldCntrd) .x - ScaffoldDisp(I) .x y = AScaffoldCntrd) .y - ScaffoldDisp(I) .y Z = AScaffoldCntrd) .Z - ScaffoldDιsp(I) .Z CASE 2 x = BScaffoldCntr(l) .x - ScaffoldDisp(I) .x y = BScaffoldCntr(1) .y - ScaffoldDisp(I) .y Z = BScaffoldCntr(1) .Z - ScaffoldDisp(I) -Z CASE 3 x = CScaffoldCntr ) .x - ScaffoldDιsp(I) x y = CScaffoldCntrd) y - ScaffoldDisp ) y Z = CScaffoldCntrd) -Z - ScaffoldDisp(I) -Z
CASE 4 x = DSeaffoldCntr(1) -x - ScaffoldDisp(I) .x y = DSeaffoldCntr(1) .y - ScaffoldDisp(I) -y
Z = DSeaffoldCntr(1) -Z - ScaffoldDisp(I) -Z
END SELECT
XYZ .x = X: XYZ .y = y : XYZ. Z = Z
Mrk 2, 1 NEXT END SUB
SUB ShowSpaceRefPts
FOR I = 1 TO SpaceRef(0) .Visib
XYZ = SpaceRef(I) .Locat
Mrk 2, 1 NEXT END SUB
SUB ShowSyncPtLines (StartOfPresentSyncPts) IF SyncPtlndex > 0 THEN
FOR s = 1 TO StartOfPresentSyncPts + 1 XPos = 40 + Interval1 * (syncpts (s) Frame - 1)
LINE (XPos, 42)-(XPos, 349), 8
VerticalText syncpts1s).Label, 125, XPos NEXT FOR s = StartOfPresentSyncPts + 1 TO SyncPtlndex
XPos = 40 + Interval' * (syncpts(s) Frame - 1)
LINE (XPos, 42)-(XPos, 349), 10
VerticalText syncpts(s).Label, 125, XPos NEXT
LOCATE 23, 1. PRINT "Vert Lines Show SyncPts Used Before
-Mark Again If Wanted Again For This Path" END IF END SUB
SUB ShowWhllmage (WchPose, ShowColor) 'showln is only good before justify FOR I = 1 TO NoOfLines
ShowLn WchPose, I, ShowColor NEXT END SUB
SUB Smooth (Arrayl, Array2, SmoothRange, EvenSpaemg) DIM Pt AS t3DPomt, Delta AS t3DPomt
IF EvenSpaemg THEN
ArrayB = TempSmoothPtsXPg ' If spacing evenly, dest of part 1 is temp array ELSE
ArrayB = Array2 ' else dest of part 1 is output array
END IF
PtLimit = GetA(Arrayl, 0)
IF PtLimit < SmoothRange + 1 THEN
SmoothRange = PtLimit - 1
IF SmoothRange < 0 THEN SmoothRange = 0 END IF
SetA ArrayB, 0, GetA(Arrayl, 0) TotalRange = 2 * SmoothRange + 1
************************************************ x Values FOR I = 1 TO PtLimit Sum' = 0
FOR J = I - SmoothRange TO I + SmoothRange IF J < 1 THEN
K = 1 ELSE
IF J > PtLimit THEN
K = PtLimit ELSE
K = J END IF END IF
Sum' = Sum' + GetAReal' (Arrayl, K) NEXT J
SetArrayReal ArrayB, I, Sum' / TotalRange NEXT I
< ************************************************ Y Values FOR I = 1 TO PtLunit Sum ' = 0
FOR J = I - SmoothRange TO I + SmoothRange IF J < 1 THEN
K = 1 ELSE
IF J > PtLimit THEN
K = PtLimit ELSE
K = J END IF END IF
Sum' = Sum' + GetAReal' (Arrayl + 1, K) NEXT J
SetArrayReal ArrayB + 1, I, Sum' / TotalRange NEXT I
***************#****#**********#*************#* ^ Values
FOR I = 1 TO PtLimit Sum' = 0
FOR J = I - SmoothRange TO I + SmoothRange IF J < 1 THEN
K = 1 ELSE
IF J > PtLimit THEN
K = PtLimit ELSE
K = J END IF END IF
Sum' = Sum' + GetAReal' (Arrayl + 2, K) NEXT J
SetArrayReal ArrayB + 2, I, Sum' / TotalRange NEXT I
, ****...».*.*.*..«..**.* insert points for even segment lens IF EvenSpaemg THEN OutIndex = 0
, *.*»**.,..,*. plncj shortest line segment MinDist' = 1E+09 FOR I = 1 TO PtLimit - 1
Dist' = DistToNextPoint(ArrayB,, I)
IF Dist1 < MinDist' THEN MinDist' = Dis 1 NEXT IF MinDist' < 1' THEN MinDist' = 1'
************* copy to new array, inserting new points where needed FOR I = 1 TO PtLimit - 1
Pt.x = GetAReal' (ArrayB + 0 I)
Pt y = GetAReal' (ArrayB + 1, I)
Pt.Z = GetAReal' (ArrayB + 2, I)
OutIndex = Outlndex + 1
SetArrayReal Array2 + 0, Outlndex, Pt.x
SetArrayReal Array2 + 1, Outlndex, Pt y
SetArrayReal Array2 + 2, Outlndex, Pt Z
Dist' = DistToNextPoin (ArrayB, I) factor1 = Dist' / MinDist'
IF factor' > 1.7 THEN
NumNewPoints = INT(factor' - .7)
Delta x = (GetAReal' (ArrayB+0, 1+1) - GetAReal' (ArrayB+0, I)) / (NumNewPoints + 1) Delta.y = (GetAReal! (ArrayB+1, 1+1) - GetAReal! (ArrayB+1, I))
(NumNewPoints + 1) Delta.Z = (GetAReal! (ArrayB+2, 1+1) - GetAReal' (ArrayB+2, I) )
(NumNewPoints + 1) FOR J = 1 TO NumNewPoints Outlndex = Outlndex + 1
SetArrayReal Array2 + 0, Outlndex, Pt.x + J * Delta.x SetArrayReal Array2 + 1, Outlndex, Pt.y + J * Delta.y SetArrayReal Array2 + 2, Outlndex, Pt.Z + J * Delta.Z NEXT END IF NEXT
SetA Array2, 0, Outlndex END IF END SUB
SUB SmoothJoin (PtsToBeJoined, Range)
DIM SmthJnPts(65) AS t3DPoint
DIM SmthJnPtsAA(65) AS t3DPomt
NoOfPtsToBeJomed = GetA(PtsToBeJoined, 0)
J = 0
FOR I = Range TO 1 STEP -1
J = J + 1
SmthJnPts(J) .x = GetAReal! (PtsToBeJoined, I)
SmthJnPts(J) .y = GetAReal! (PtsToBeJoined + 1, I)
SmthJnPts(J) .Z = GetAReal!(PtsToBeJoined + 2, I) NEXT FOR I = NoOfPtsToBeJomed TO NoOfPtsToBeJoined Range STEP -1
J = J + 1
SmthJnPts(J) .x = GetAReal! (PtsToBeJoined, I)
SmthJnPts(J) -y = GetAReal!(PtsToBeJoined + 1, I)
SmthJnPts (J) -Z = GetAReal! (PtsToBeJoined + 2, I) NEXT
SmthJnPts(0) .x = J
OldSmooth SmthJnPts() , SmthJnPtsAA() , 5 J = 0 FOR I = Range TO 1 STEP -1
J = J + 1
SetArrayReal PtsToBeJoined, I, SmthJnPtsAA(J) -x
SetArrayReal PtsToBeJoined + 1 I, SmthJnPtsAA(J) .y
SetArrayReal PtsToBeJoined + 2 I, SmthJnPtsAA(J) .Z NEXT FOR I = NoOfPtsToBeJoined TO NoOfPtsToBeJomed Range STEP -1
J = J + 1
SetArrayReal PtsToBeJoined, I, SmthJnPtsAA(J) -X
SetArrayReal PtsToBeJoined + 1 I, SmthJnPtsAA(J) .y
SetArrayReal PtsToBeJoined + 2 I, SmthJnPtsAA(J) .Z NEXT END SUB
SUB SortSyncPtsForApplic (Kind, WchNo) 'kind: l=obj , 2=grp, 3=wrp
'this re-sorts sync pts for what obj or grp or wrp they are for, every time ' so index goes from one to noof syncpts for that obj or grp etc.
SortedSyncPts d) .Frame = 1 'this Mks first SortedSyncPts (syncpt) start of path
SortedSyncPts (1) .TempPtslndex = 1 SortedSyncPts (1). abel = "StartFrm" SortedSyncPtsIndex = 1
IF Kind = 1 THEN
SortedSyncPts(1) .WchObj = WchNo FOR G = 1 TO SyncPtlndex
IF syncpts(G) .WchObj = WchNo THEN
SortedSyncPtsIndex = SortedSyncPtsIndex + 1
'first real SortedSyncPts is index 2 SortedSyncPts(SortedSyncPtsIndex) .WchObj = WchNo SortedSyncPts(SortedSyncPtsIndex) .Frame = syncpts(G) .Frame SortedSyncPts(SortedSyncPtsIndex) .Label = syncpts(G) .Label SortedSyncPts(SortedSyncPtsIndex) .TeπpPtsIndex = syncpts(G) .TempPtslndex END IF NEXT
SortedSyncPts(SortedSyncPtsIndex + 1) .WchObj = WchNo END IF
IF Kind = 2 THEN
SortedSyncPts (1) .WchGrp = WchNo FOR G = 1 TO SyncPtlndex
IF syncpts(G) .WchGrp = WchNo THEN
SortedSyncPtsIndex = SortedSyncPtsIndex + 1
'first real SortedSyncPts is index 2 SortedSyncPts(SortedSyncPtsIndex) .WchGrp = WchNo SortedSyncPts(SortedSyncPtsIndex) -Frame = syncpts(G) .Frame SortedSyncPts(SortedSyncPtsIndex) .Label = syncpts(G) .Label SortedSyncPts(SortedSyncPtsIndex) .TempPtslndex = syncpts(G) .TempPtslndex END IF NEXT
SortedSyncPts(SortedSyncPtsIndex + 1) .WchGrp = WchNo END IF
IF Kind = 3 THEN
SortedSyncPts(1) .WchWrp = WchNo FOR G = 1 TO SyncPtlndex
IF syncpts(G) .WchWrp = WchNo THEN
SortedSyncPtsIndex = SortedSyncPtsIndex + 1
'first real SortedSyncPts is index 2 SortedSyncPts(SortedSyncPtsIndex) .WchWrp = WchNo SortedSyncPts(SortedSyncPtsIndex) .Frame = syncpts(G) -Frame SortedSyncPts(SortedSyncPtsIndex) -Label = syncpts(G) -Label SortedSyncPts(SortedSyncPtsIndex) .TempPtslndex = syncpts(G) .TeπpPtsIndex END IF NEXT
SortedSyncPts(SortedSyncPtsIndex + 1) .WchWrp = WchNo END IF
SortedSyncPts(SortedSyncPtsIndex + 1) .Frame = NoOfFrames
'this Mks last SortedSyncPts(syncpt) end of array SortedSyncPts(SortedSyncPtsIndex + 1) .TempPtslndex = GetA(TempPtsXPg, 0) SortedSyncPts(SortedSyncPtsIndex + 1) .Label = "EndFrm" NoOfSortedSyncPts = SortedSyncPtsIndex + 1 END SUB
SUB Stretch (Small, Big, StartSmall, EndSmall, StartBig, EndBig) NoOfSmall = EndSmall - StartSmall: NoOfBig = EndBig - StartBig IF NoOfSmall <> 0 AND NoOfBig <> 0 THEN
SetArrayReal Big, StartBig, GetAReal' (Small, StartSmall) SetArrayReal Big + 1, StartBig, GetAReal' (Small + 1, StartSmall) SetArrayReal Big + 2, StartBig, GetAReal' (Small + 2, StartSmall)
SetArrayReal Big, EndBig, GetAReal' (Small, EndSmall) SetArrayReal Big + 1, EndBig, GetAReal' (Small + 1, EndSmall) SetArrayReal Big + 2, EndBig, GetAReal' (Small + 2, EndSmall)
Ratio' = (NoOfBig / NoOfSmall) END IF
LastBig = StartBig 'at the start only
FOR I = StartSmall - StartSmall + 1 TO EndSmall - StartSmall - 1 BigNdx = CINT(StartBig + (I * Ratio'))
SetArrayReal Big, BigNdx, GetAReal' (Small, StartSmall + I) SetArrayReal Big + 1, BigNdx, GetAReal' (Small + 1, StartSmall + I) SetArrayReal Big + 2, BigNdx, GetAReal' (Small + 2, StartSmall + I) IF BigNdx > LastBig + 1 THEN Interpo Big, LastBig, BigNdx LastBig = BigNdx
NEXT
IF EndBig > LastBig + 1 THEN Interpo Big, LastBig, EndBig
END SUB
SUB SwapL eDirection
WchPose = UserChoice("Swap Direction Of A Line In Which Pose'",
"A", "B", "C", "D", "") CLS
LineNo = 0 DO
IF LineNo <> 0 THEN ShowFinalLn WchPose, LineNo, 0
LineNo = LineNo + 1
IF LineNo > NoOfLines THEN L eNo = 1
ShowFinalLn WchPose, LineNo, -1 LOOP WHILE NOT Confirm("This Line'") Index = 0 J = 0
Start = ALns(LineNo) .FinalStart Finish = ALns(LineNo) FinalEnd FOR I = Start TO Finish
J = J + 1
SetArrayReal TempPtsXPg, J, GetAReal' (APtsXPg + 3 * (WchPose - 1), I)
SetArrayReal TempPtsYPg, J, GetAReal' (APtsYPg + 3 * (WchPose - 1), I)
SetArrayReal TempPtsZPg, J, GetAReal ' (APtsZPg + 3 * (WchPose - 1), I)
EndTempPts = J NEXT FOR I = Finish TO Start STEP -1
Index = Index + 1
SetArrayReal APtsXPg + 3* (WchPose-1) , I, GetAReal' (TempPtsXPg, Index)
SetArrayReal APtsYPg + 3* (WchPose-1) , I, GetAReal' (TeirpPtsYPg, Index)
SetArrayReal APtsZPg + 3* (WchPose-1) , I, GetAReal' (TempPtsZPg, Index) NEXT
I = LineNo
ALnsd) Beg = ALnsd) FinalStart ALns ) -Fm = ALnsd) -FinalEnd BLns(I) .Beg = ALnsd) FinalStart BLns(I) .Fin = ALnsd) .FinalEnd CLns(I) .Beg = ALns ) .FinalStart CLns(I) .F = ALnsd) .FinalEnd DLns(I).Beg = ALnsd) .FinalStart DLns(I).Fin = ALns(I) .FinalEnd
END SUB
SUB SwapSortedSyncPts
FOR I = 1 TO SortedSyncPtlndex - 1 FOR q = 1 TO SortedSyncPtlndex - I
IF SortedSyncPts(q) .Frame > SortedSyncPts(q + 1) .Frame THEN SWAP SortedSyncPts(q) .Frame, SortedSyncPts(q + 1) .Frame SWAP SortedSyncPts(q) .TeπpPtsIndex,
SortedSyncPts(q + 1) .TempPtslndex SWAP SortedSyncPts(q) .WchObj, SortedSyncPts(q + 1) .WchObj SWAP SortedSyncPts(g) .WchGrp, SortedSyncPts(q + 1) -WchGrp SWAP SortedSyncPts(q) -WchWrp, SortedSyncPts(q + 1) -WchWrp
'CAN'T SWAP STRINGS in a type, APPARENTLY, THEREFORE: LabelAS = SortedSyncPts(q) .Label LabelBS = SortedSyncPts(q + 1) .Label
SortedSyncPts(q) .Label = LabelBS SortedSyncPts(q + 1) .Label = LabelAS
END IF NEXT NEXT END SUB
SUB TransPtr (FrameNo, WchGrp, AllProp AS TransType) SELECT CASE WchGrp
CASE 1: AllProp = Trans1(FrameNo)
CASE 2: AllProp = Trans2 (FrameNo)
CASE 3: AllProp = Trans3 (FrameNo)
CASE 4: AllProp = Trans4(FrameNo)
CASE 5: AllProp = Trans5(FrameNo) END SELECT END SUB
SUB TrnsfrATo (Array, I ageLns() AS LineType) FOR I = 0 TO GetA(APtsXPg, 0)
SetArrayReal Array, I, GetAReal! (APtsXPg, I)
SetArrayReal Array + 1, 1, GetAReal.' (APtsXPg + 1. I)
SetArrayReal Array + 2, I, GetAReal! (APtsXPg + 2, I) NEXT FOR I = 0 TO NoOfLines
ImageLns(I) .Beg = ALnsd) .Beg ImageLns (I) .Fin = ALns(I) .Fin NEXT
SetA Array, 0, GetA(APtsXPg, 0) END SUB
SUB TrnsfrPath (aSourceArray, PathNo)
TrnsfrWhlArray aSourceArray, PathlXPg + 3 * (PathNo - 1)
END SUB
SUB TrnsfrPrevLineToIm (WchSource, DestinationPose, WchLine) SELECT CASE WchSource CASE 1
TrnsfrPrevLnToTeπpPts APtsXPg, ALns(WchLine) -Beg, ALns(WchLine) .Fin, WchSource, DestinationPose CASE 2
TrnsfrPrevLnToTeπpPts BPtsXPg, BLns(WchLine) .Beg, BLns(WchLine) fin,
WchSource, DestinationPose CASE 3
TrnsfrPrevLnToTeπpPts CPtsXPg, CLns(WchLine) .Beg, CLns(WchLine) Fin,
WchSource, DestinationPose END SELECT END SUB
SUB TrnsfrPrevLnToTempPts (Array, Start, Finish, WchSource,
DestinationPose) DIM shift AS t3DPoint shift.x = ImDrawmgCentrDisp(DestinationPose) .x -
ImDrawmgCentrDisp(WchSource) .x shift.y = ImDrawmgCentrDisp(DestinationPose) .y -
ImDraw gCentrDisp(WchSource) .y shift.Z = ImDrawmgCentrDisp(DestinationPose) .Z -
ImDrawmgCentrDisp(WchSource) .Z J = 0 FOR I = Start TO Finish
J = J + 1
SetArrayReal TeπpPtsXPg,
SetArrayReal TeπpPtsYPg,
SetArrayReal TerrpPtsZPg,
Figure imgf000168_0001
NEXT
SetA TempPtsXPg, 0, J END SUB
SUB TrnsfrProp (ArrayO AS TransType, NoOfVals) FOR I = 1 TO NoOfVals
Array(I) .PropA = TransGrfVal(I) .PropA
Array(I) .PropB = TransGrfVal(I) .PropB
Array(I) .PropC = TransGr Val(I) .PropC
Array!I) .PropD = TransGrfVal(I) .PropD NEXT END SUB
SUB TrnsfrTmpToImPartA (WchPose)
IF WchPose = 1 THEN TrnsfrTπpToImPartB APtsXPg
IF WchPose = 2 THEN TrnsfrTtπpToI PartB BPtsXPg
IF WchPose = 3 THEN TrnsfrTmpToImPartB CPtsXPg
IF WchPose = 4 THEN TrnsfrTπpToImPartB DPtsXPg
LdLnLnArrays WchPose, Col
END SUB
SUB TrnsfrTmpToImPartB (PtArray)
FOR I = 1 TO GetA(TeπpPtsXPg, 0) 'ι=l to end of temppts
J = I + GetA(PtArray, 0) 'j=ι+end of previous line in this Pose SetArrayReal PtArray, J, GetAReal! (TempPtsXPg, I) SetArrayReal PtArray + 1, J, GetAReal' (TempPtsXPg + 1, I) SetArrayReal PtArray + 2, J, GetAReal' (TempPtsXPg + 2, I)
NEXT
SetA PtArray, 0, J 'this sets end of Apts, BPts etc. to new end
END SUB
SUB TrnsfrWarp (Array0 AS WarpProfileType, NoOfVals) FOR I = 1 TO NoOfVals Array(I).Proportion = GetAReal (RawPtsXPg, I) NEXT
SetArrayReal RawPtsXPg, 0, NoOfVals END SUB
SUB TrnsfrWave (WaveNo) SELECT CASE WaveNo CASE 1
TrnsfrWhlArray FastWorkArray2XPg, JAPtsXPg CASE 2
TrnsfrWhlArray FastWorkArray2XPg, JBPtsXPg CASE 3
TrnsfrWhlArray FastWorkArray2XPg, JCPtsXPg CASE 4
TrnsfrWhlArray FastWorkArray2XPg, JDPtsXPg END SELECT END SUB
SUB TrnsfrWhlArray (Arrayl, Array2)
Elements = GetA(Arrayl, 0)
Source = Arrayl
Dest = Array2
FOR I = 1 TO Elements
SetArrayReal Dest, I, GetAReal! (Source, I) NEXT SetA Dest, 0, Elements
Source = Arrayl + 1 Dest = Array2 + 1 FOR I = 1 TO Elements
SetArrayReal Dest, I, GetAReal! (Source, I) NEXT
Source = Arrayl + 2 Dest = Array2 + 2 FOR I = 1 TO Elements
SetArrayReal Dest, I, GetAReal! (Source, I) NEXT END SUB
FUNCTION UserChoice (TextS, AS, BS, CS, D$, E$)
ErsMnu
LOCATE 2, 1: PRINT TextS
IF AS <> "" THEN
LOCATE 1, 3
PRINT AS
LINE (MBXValsd), 0)-(MBXVals(2) , 13), 5, B END IF IF B$ <> "" THEN
LOCATE 1, 19
PRINT B$
LINE (MBXValsO), 0)-(MBXVals(4) , 13), 5, B END IF IF C$ <> " " THEN
LOCATE 1, 35
PRINT C$
LINE (MBXVals(5), 0)-(MBXVals(6) , 13), 5, B END IF IF DS <> "" THEN LOCATE 1, 51 PRINT DS LINE (MBXVals (7) 0)- (MBXVals(8) , 13) , 5, B END IF
IF ES <> "" THEN LOCATE 1, 67 PRINT ES LINE (MBXValsO) 0)-(MBXVals(10) , 13), 5, B END IF Done = False WHILE Done = False Wndln CalcFlatXY CalcMrkrPts ShowFlatCrsr IF XYZ.y > 0 AND XYZ.y < 16 THEN SELECT CASE XYZ.x CASE MBXValsd) TO MBXVals (2) Done = True: UserChoice = 1 CASE MBXVals(3) TO MBXVals(4) Done = True: UserChoice = 2 CASE MBXVals(5) TO MBXVals(6) Done = True: UserChoice = 3 CASE MBXVals(7) TO MBXVals(8) Done = True: UserChoice = 4 CASE MBXValsO) TO MBXVals(10) Done = True: UserChoice = 5 END SELECT END IF WEND
MyDelay 1 ErsM u END FUNCTION
SUB Velcro VelcroNo = 0 DO
VelcroNo = VelcroNo + 1
AS = Group(1).Label: BS = Group(2) .Label
CS = Group(3).Label: DS = Group(4) .Label: ES = Grou (5).Label
VelcroAGrp(VelcroNo) .GrpWithHook =
UserChoice("Which Group is Master?",
Group(1) .Label, Grou (2) .Label,
Group(3) .Label, Group(4) .Label, Group(5) .Label)
CLS
ShowGrp 1, VelcroAGrp(VelcroNo) .GrpWithHook,
RightGrp = False
DO
LOCATE 1 TextS = Mrk Point On A Master Group Line To Which Handle Of Slave Group Is To Stick" FindMrkdPtlnAPose ThisOne, TextS WchSeg = FindWchFinlSg(FinlSgs0 , ThisOne) WchFoundGrp = FinlSgs(WchSeg) .WchGrp
IF WchFoundGrp = VelcroAGrp(VelcroNo) .GrpWithHook THEN VelcroAGrp(VelcroNo) .HookPtlndex = ThisOne RightGrp = True ELSE
Mrk 1, 1 END IF LOOP UNTIL RightGrp = True
SlaveGrpOK = False
DO WHILE NOT SlaveGrpOK VelcroAGrp(VelcroNo! .SlaveGrp =
UserChoice("Which Group is Slave'",
Group(1) .Label, Group(2) .Label, Group(3) .Label, Group(4) .Label, Group(5) .Label) IF Group(VelcroAGrp(VelcroNo) .SlaveGrp) .WchObj =
Grou (VelcroAGrp(VelcroNo) .GrpWithHook) .WchObj THEN SlaveGrpOK = True ELSE
LOCATE 3, 1: PRINT "Doesn't Belong To Same Object. ReDo" SLEEP 1
LOCATE 3, 1 PRINT SPACES(60) END IF LOOP LOOP WHILE Confirm("Velcro More Groups?") NoOfVelcros = VelcroNo END SUB
SUB VerticalText (TextS, y, x) VertTextLocat = CINT(y / 14) HorTextLocat = INT(x / 8) FOR I = 1 TO LE (TextS)
Letters = MIDS(TextS, I, 1)
IF VertTextLocat > 0 AND VertTextLocat < 23 AND HorTextLocat > 0 AND HorTextLocat < 81 THEN LOCATE VertTextLocat + 1, HorTextLocat + 1 PRINT Letters END IF
VertTextLocat = VertTextLocat + 1 NEXT END SUB
SUB VisInvisObj
ChooseOb RefObject, "Which Object?"
INPUT "Object Appears At Frame"; Object(RefObject) .StartVis
INPUT "Object Disappears At Frame"; Object(RefObject) .EndVis
END SUB
SUB WaitForClick
WHILE INP(889) >= 128: WEND
WHILE INP(889) < 128: WEND END SUB
SUB WarpSegPathArrayPositPtr (FrameNo, WchPath,
WarpSegPathPtPosit AS t3DPoιnt) WarpSegPathPtPosit.x = GetAReal' (PathlXPg + 3* (WchPath-1) , FrameNo) WarpSegPathPtPosit.y = GetAReal! (PathlYPg + 3* (WchPath-1) , FrameNo) WarpSegPathPtPosit.Z = GetAReal! (PathlZPg + 3* (WchPath-1) , FrameNo)
END SUB
(WchProf, WherelnProf)
= Profilel(WherelnProf) .Proportion = Profile2(WherelnProf) .Proportion = Profile3(WherelnProf) -Proportion = Profile4(WherelnProf) .Proportion = Profiles(WherelnProf) .Proportion = Profileδ(WherelnProf) .Proportion = Profile?(WherelnProf) .Proportion
Figure imgf000171_0001
= Profileβ(WherelnProf) -Proportion CASE 9. WarpSegProfPtr1 Profιle9(WherelnProf) Proportion END SELECT END FUNCTION
SUB WarpSegWaveShapePtr (PositionNo, WchWave,
WarpSegWaveDisp AS t3DPomt)
SELECT CASE WchWave
CASE 1
WarpSegWaveDisp.x GetAReal' (JAPtsXPg, PositionNo) WarpSegWaveDisp.y GetAReal' (JAPtsYPg, Pos11lonNo) WarpSegWaveDis .Z GetAReal' (JAPtsZPg, PositionNo)
CASE 2
WarpSegWaveDisp.x GetAReal' (JBPtsXPg, PositionNo) WarpSegWaveDisp.y GetAReal! (JBPtsYPg, PositionNo) WarpSegWaveDisp.Z GetAReal' (JBPtsZPg, PositionNo)
CASE 3
WarpSegWaveDis .x GetAReal' (JCPtsXPg, PositionNo) WarpSegWaveDisp.y GetAReal' (JCPtsYPg, PositionNo) WarpSegWaveDisp.Z GetAReal! (JCPtsZPg, PositionNo)
CASE 4
WarpSegWaveDis .x GetAReal' (JDPtsXPg, PositionNo) WarpSegWaveDisp.y GetAReal ' (JDPtsYPg, PositionNo) WarpSegWaveDisp.Z GetAReal' (JDPtsZPg PositionNo) END SELECT END SUB
SUB WndChs (TextS, AS, BS, C$, DS, ES, Ans$, When)
ErsMnu
WndMnu TextS, AS, BS, CS, D$, ES
IF When = 0 THEN WndSlct AnsS, 1
END SUB
SUB Wndln
'minus moves cursor away from viewer
DIM Location AS WandReportType
ReadWand Location 'XYZ switches are becuz of wand transmitter mounting only XYZ x = 320' + (-Location.y / XLeverage) + XAdjust - 50 XYZ.y = 320' - (ABS(Locatιon.Z) / YLeverage) + YAdjust - 50 XYZ.Z = -Location.x / ZLeverage + ZAdjust + Zoom' IF ZFixed = True THEN XYZ.Z = 0 END SUB
SUB WndMnu (TextS, A$, B$, C$, DS, E$> LOCATE 2, 1: PRINT TextS
IF AS <> "x" THEN
LOCATE 1, 3
PRINT A$
LINE (MBXValsd), 0)-(MBXVals(2) , 13), 5, B END IF IF BS <> "x" THEN
LOCATE 1, 19
PRINT B$
LINE (MBXValsO), 0)- (MBXVals(4) , 13), 5, B END IF IF CS <> "x" THEN
LOCATE 1, 35
PRINT CS
LINE (MBXVals(5), 0)-(MBXVals(6) , 13), 5, B END IF
IF DS <> "X" THEN
LOCATE 1, 51
PRINT DS
LINE (MBXVals(7), 0)-(MBXVals(8) , 13), 5, B END IF IF ES <> "x" THEN
LOCATE 1, 67
PRINT ES
LINE (MBXValsO), 0)-(MBXVals(10) , 13), 5, B END IF END SUB
SUB WndPtScan (Object, Object2, Group, Group2, Array, Limit,
MarkType, ScanForWhat) NoMarker = False: Frmsnd = False LOCATE 23, 28 PRINT "BACK" LOCATE 23, 38: PRINT "STATIC" LOCATE 23, 49- PRINT "FORWARD" LINE (0, 340)-(639, 340), 8 LINE (0, 349)-(639, 349), 8 LINE (300, 340)-(300, 349), 8 LINE (346, 340J-O46, 349), 8 LOCATE 1, 1 SELECT CASE ScanForWhat
CASE eScanTransOnTempGraph speed = 0
PRINT "Scan ACTION Created By Action Control Graph (click to exit)
LOCATE 22, 38 PRINT "Te pPt' LOCATE 22, 60
PRINT "TotalPts", Limit CASE eObjPathOnTempPts speed = 0
PRINT "Scan Object s MOVEMENT OVER PATH IN SPACE (click to exit)"
NoMarker = True
LOCATE 22, 38
PRINT "TempPt"
LOCATE 22, 60
PRINT "TotalPts", Limit CASE eObjPathByFr s speed = 0
Frmsnd = True
PRINT "Scan Object's MOVEMENT OVER PATH IN SPACE BY FRAMES (click to exit) "
NoMarker = True
LOCATE 22, 38
PRINT "FRAME"
LOCATE 22, 60
PRINT "TotalFrms", Limit CASE eScanForWarpByFrms speed = 0
PRINT "Scan Warp BY FRAMES (click to exit)"
LOCATE 22, 38
PRINT "FRAME" CASE eScanTransByFrms speed = 0
Frmsnd = True
PRINT "Scan ACTION ONLY By FRAMES (click to exit) "
LOCATE 22, 38
PRINT "FRAME"
LOCATE 22, 60 PRINT "TotalFrms" ,- Limit CASE eScanGrpTransPlusPath speed = 0
Frmsnd = True
PRINT "Scan ACTION PLUS MOVEMENT OVER PATH IN SPACE BY FRAMES (click to exit) "
NoMarker = True
LOCATE 22, 38
PRINT "FRAME"
LOCATE 22, 60
PRINT "TotalFrms"; Limit CASE eScanForOb PathSyncPt speed = 500
PRINT "Define Object Path SYNC PT -Click To Mark"
LOCATE 22, 38
PRINT "TempPt"
LOCATE 22, 60
PRINT "TotalPts"; Limit CASE eScanForTransSyncPt speed = 500
PRINT "Define Action Control Graph SYNC FT -Click To Mark"
LOCATE 22, 38
PRINT "TempPt"
LOCATE 22, 60
PRINT "TotalPts"; Limit CASE eScanForWarpSyncPt speed = 500
PRINT "Define Warp SYNC PT -Click To Mark"
LOCATE 22, 38
PRINT "TeπpPt"
LOCATE 22, 60
PRINT "TotalPts"; Limit CASE eScanForReferenceObject speed = 200
PRINT "Scan Over Frames To Locate Reference ObjectNGroup -Click To Select Frame"
LOCATE 22, 38
PRINT "FRAME"
LOCATE 22, 60
PRINT "TotalFrms"; Limit CASE eScanForAnchorPts speed = 1000
PRINT "Define ANCHOR PT (Click To Mark) "
LOCATE 22, 38
PRINT "FRAME"
LOCATE 22, 60
PRINT "TotalFrms"; Limit END SELECT
LastDelayedScanlndex = 1 STATIC Scanlndex
'LOCATE 2, 1: PRINT "Click To Mark Or Exit" DO
Wndln
XYZ.y = 342: XYZ.Z = 0
ShowFlatCrsr
Change = INT(XYZ.x / 50) - 6
Scanlndex = Scanlndex + Change
IF Scanlndex < 1 THEN Scanlndex = Limit
IF Scanlndex > Limit THEN Scanlndex = 1
LOCATE 22, 44: PRINT Scanlndex; " " XYZ.x = GetAReal' (Array, Scanlndex) XYZ.y = GetAReal! (Array + 1, Scanlndex) XYZ.Z = GetAReal! (Array + 2, Scanlndex) IF NoMarker = False THEN Mrk MarkType, 1 SELECT CASE ScanForWhat CASE eOb PathOnTempPts
ShowObjOnPath Object, Obj2, XYZ CASE eOb PathByFrms
ShowObjOnPath Object, Obj2, XYZ CASE eScanForWarpByFrms LOCATE 4, 1
PRINT "Visual not implemented" CASE eScanTransOnTempGraph
ShowGroupTScript Group, Group2, Scanlndex, "Temp" CASE eScanTransByFrms
ShowGroupTScript Group, Group2, Scanlndex, "Frames" CASE eScanForObjPathSyncPt
ShowObjOnPath Object, 0b 2, XYZ CASE eScanForTransSyncPt
ShowGroupTScript Group, Group2, Scanlndex, "Temp" CASE eScanForWarpSyncPt LOCATE 4, 1
PRINT "not implemented" CASE eScanGrpTransPlusPath
ShowGrpTranslnPathPosit Object, Group, Group2, Scanlndex CASE eScanForReferenceObject
ShowGrpTranslnPathPosit Object, Group, Group2, Scanlndex CASE eScanForAnchorPts
ShowGrpTranslnPathPosit Object, Group, Group2, Scanlndex END SELECT counter = 0
DO WHILE counter < speed counter = counter + 1 FOR I = 1 TO 500: NEXT LOOP
IF NoMarker = False THEN Mrk MarkType, 1 IF INP(889) < 128 THEN
IF ScanForWhat = eScanForAnchorPts THEN BEEP Foundlt = True ThisOne = Scanlndex ReferenceFrame = Scanlndex Mrk 3, 1 EXIT DO END IF LOOP END SUB
SUB WndSlct (AnsS, Delay)
AnsS = "zilch"
DO
Wndln
CalcFlatXY
CalcMrkrPts
ShowFlatCrsr
DO UNTIL INP(889) >= 128
LOOP
SELECT CASE XYZ.y CASE 1 TO 15
SELECT CASE XYZ.x CASE MBXValsd)
CASE MBXValsO)
CASE MBXVals(5)
CASE MBXVals(7)
Figure imgf000176_0001
CASE MBXValsO) TO MBXValsdO): AnsS = ES: EXIT DO
CASE ELSE: EXIT DO
END SELECT END SELECT LOOP
IF Delay = 1 THEN MyDelay 1 END SUB
SUB WriteXFerlnfo (C, P, x!, y! , Z!)
Transferlnfo.Cmd = C Transferlnfo.Param = P TransferInfo.x = x! TransferInfo.y = yi Transferlnfo.Z = Z!
PUT #2, , Transferlnfo
END SUB
FUNCTION XYZDiff
STATIC LastXYZ AS t3DPoint
XYZDiff = (XYZ.x <> LastXYZ. ) OR
(XYZ.y <> LastXYZ.y) OR
(XYZ.Z <> LastXYZ.Z) LastXYZ = XYZ END FUNCTION

Claims

I CLAIM:
1. In a computer animation system, a process for defining object transformations in animation drawings using two or more predetermined source poses for said object, the process comprising: storing a plurality of source poses for an object for use in an animation sequence for said object, each said source pose comprising predetermined form of said object, defining a pose transformation space dependent upon the number of said stored source poses, assigning each said source pose to a point within said pose transformation space, traversing a path within said pose transformation space using a computer input device, said computer selecting a plurality of points along said path, calculating, for each said selected point, the distance to each of said source pose points, generating, for each said selected point, a corresponding constructed pose, said constructed pose comprised of a composite of said source poses, wherein the contribution of each said source pose is determined by its distance to said selected point, and storing said constructed pose for use in an animation sequence.
2. The process of claim 1 wherein said pose transformation space is two-dimensional.
3. The process of claim 1 wherein said pose transformation space is three-dimensional.
4. The process of claim 1 wherein said pose transformation space is six-dimensional.
5. The process of claim 1 further comprising monitoring the rate of motion of said input device and using said rate to control the rate of change of an animation sequence comprising a transformation of the form of said object utilizing a plurality of said constructed poses.
6. The process of claim 1 further comprising displaying said constructed pose concurrently with said drawing of said path.
7. The process of claim 2 wherein said pose transformation space is a polygon and said source poses are assigned to vertices of said polygon.
8. The process of claim 3 wherein said pose transformation space is a polyhedron.
9. The process of claim 5 further comprising displaying a velocity profile for said motion of said input device, said velocity profile comprising a graphical representation of said rate of change of said animation during said transformation of said object.
10. The process of claim 6 wherein each said constructed pose is displayed substantially at the same time said input device traverses the point corresponding to said constructed pose.
11. The process of claim 7 wherein said pose transformation space is a triangle.
12. The process of claim 8 wherein said pose transformation space is substantially the shape of a tetrahedron and one source pose is assigned to each of the four vertices of said tetrahedron.
13. The process of claim 9 further comprising modifying said displayed velocity profile using said input device to adjust said rate of change of said animation sequence.
14. The process of claim 13 further comprising monitoring the rate of motion of said input device and using said rate to control the rate of change of an animation sequence comprising a transformation of the form of said object utilizing a plurality of said constructed poses.
15. The process of claim 14 further comprising displaying a velocity profile for said motion of said input device, said velocity profile comprising a graphical representation of said rate of change of said animation during said transformation of said object.
16. The process of claim 15 further comprising modifying said displayed velocity profile using said input device to adjust said rate of change of said animation sequence.
17. In a computer animation system, a process for transforming line segments in an animation sequence, the process comprising: selecting, using a computer input device to control the movement of a cursor in a computer drawing space, a reference point having a predetermined initial position, traversing a motion path relative to said predetermined reference point using said input device, said motion path defining the displacement of said reference point from its initial position for a plurality of frames of animation, selecting, in a first animation drawing, a line segment for transformation, said line segment comprised of a plurality of points with initial predetermined x, y, and z coordinates, defining, for each point comprising said line segment, a displacement of said point relative to the displacement of said reference point from said initial position, for each point comprising said line segment, adding said relative displacement to said initial predetermined coordinates to determine new coordinates for said point in a second animation drawing, storing said new coordinates for each of said points comprising said line segments, and using said stored coordinates to generate a new line segment in said second frame of animation, said new line segment replacing said line segment in said first frame of animation.
18. The process of claim 17 wherein said relative displacements are defined by drawing, using said input device, a graph of relative displacement as a function of position along said segment.
19. A process for automatically painting closed loops in a computer drawing system, said process comprising: selecting a closed loop for painting in a predetermined fill color and a predetermined loop line color, determining the minimum and maximum x and y coordinates of a two-dimensional projection of said closed loop, generating a rectangle in said predetermined fill color slightly larger than said loop using said minimum and maximum x and y coordinates, said rectangle generated so as to completely encompass said loop generated in said predetermined loop line color, determining the area bounded by said loop and said rectangle, filling said bounded area with transparent color to generate said loop in said predetermined loop line color and filled in said predetermined fill color.
20. The process of claim 19 applied in a computer animation system wherein said process is repeated for a plurality of animation drawings including said closed loop.
21. In a computer-assisted animation system for generating stereoscopic animation drawings including a left eye image and right eye image for each drawing, a process for automatically painting closed loops in a computer drawing system, said process comprising: selecting a closed loop for painting in a predetermined fill color and a predetermined loop line color, determining the minimum and maximum x and y coordinates of the two-dimensional left and right eye projections of said closed loop, for each of said left and right eye projections: generating a rectangle in said predetermined fill color slightly larger than said loop using said minimum and maximum x and y coordinates, said rectangle generated so as to completely encompass said loop generated in said predetermined loop line color, determining the area bounded by said loop and said rectangle, filling said bounded area with transparent color to generate said loop in said predetermined loop line color and filled in said predetermined fill color.
22. In a computer animation system, a system for defining object transformations in animation drawings using two or more predetermined source poses for said object, the process comprising: means for storing a plurality of source poses for an object for use in an animation sequence for said object, each said source pose comprising predetermined form of said object, means for defining a pose transformation space dependent upon the number of said stored source poses, means for assigning each said source pose to a point within said pose transformation space, means for traversing a path within said pose transformation space using a computer input device, said computer selecting a plurality of points along said path, means for calculating, for each said selected point, the distance to each of said source pose points, means for generating, for each said selected point, a corresponding constructed pose, said constructed pose comprised of a composite of said source poses, wherein the contribution of each said source pose is determined by its distance to said selected point, and means for storing said constructed pose for use in an animation sequence.
PCT/CA1996/000881 1995-12-26 1996-12-24 Computer-assisted animation construction system and method and user interface WO1997024696A2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP52393897A JP4048447B2 (en) 1995-12-26 1996-12-24 Animation production system and method using computer and user interface
EP96942218A EP0875042B1 (en) 1995-12-26 1996-12-24 Computer-assisted animation construction system and method and user interface
DE69606890T DE69606890T2 (en) 1995-12-26 1996-12-24 COMPUTER ASSISTED ANIMATION DESIGN SYSTEM AND METHOD AND USER INTERFACE
AU32353/97A AU3235397A (en) 1995-12-26 1996-12-24 Computer-assisted animation construction system and method and user interface
CA002241854A CA2241854C (en) 1995-12-26 1996-12-24 Computer-assisted animation construction system and method and user interface

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US08/578,293 1995-12-26
US08/578,293 US5854634A (en) 1995-12-26 1995-12-26 Computer-assisted animation construction system using source poses within a pose transformation space

Publications (2)

Publication Number Publication Date
WO1997024696A2 true WO1997024696A2 (en) 1997-07-10
WO1997024696A3 WO1997024696A3 (en) 1997-08-14

Family

ID=24312239

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CA1996/000881 WO1997024696A2 (en) 1995-12-26 1996-12-24 Computer-assisted animation construction system and method and user interface

Country Status (6)

Country Link
US (3) US5854634A (en)
EP (1) EP0875042B1 (en)
JP (2) JP4048447B2 (en)
AU (1) AU3235397A (en)
DE (1) DE69606890T2 (en)
WO (1) WO1997024696A2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999006961A1 (en) * 1997-08-01 1999-02-11 Avid Technology, Inc. Method for generating 3d animations from animation data
CN101878489B (en) * 2008-05-01 2012-12-05 科乐美数码娱乐株式会社 Image processing device, image processing method

Families Citing this family (100)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6094202A (en) * 1995-12-01 2000-07-25 Lucas Digital Ltd. Method and apparatus for creating lifelike digital representations of computer animated objects
US5818461A (en) * 1995-12-01 1998-10-06 Lucas Digital, Ltd. Method and apparatus for creating lifelike digital representations of computer animated objects
US6154222A (en) * 1997-03-27 2000-11-28 At&T Corp Method for defining animation parameters for an animation definition interface
US6970172B2 (en) 1997-03-27 2005-11-29 At&T Corp. Method for defining MPEG 4 animation parameters for an animation definition interface
US7920143B1 (en) 1997-03-27 2011-04-05 At&T Intellectual Property Ii, L.P. Method for defining animation parameters for an animation definition interface
US6483513B1 (en) * 1998-03-27 2002-11-19 At&T Corp. Method for defining MPEP 4 animation parameters for an animation definition interface
US6191790B1 (en) 1998-04-01 2001-02-20 Microsoft Corporation Inheritable property shading system for three-dimensional rendering of user interface controls
US6249284B1 (en) 1998-04-01 2001-06-19 Microsoft Corporation Directional navigation system in layout managers
US6169546B1 (en) * 1998-04-01 2001-01-02 Microsoft Corporation Global viewer scrolling system
US6621938B1 (en) * 1998-09-18 2003-09-16 Fuji Photo Film Co., Ltd. Image capture apparatus and method
JP3611239B2 (en) * 1999-03-08 2005-01-19 富士通株式会社 Three-dimensional CG model creation device and recording medium on which processing program is recorded
US6469702B1 (en) * 1999-04-16 2002-10-22 Avid Technology, Inc. Method and system for editing function curves in two dimensions
US6968004B1 (en) * 1999-08-04 2005-11-22 Kabushiki Kaisha Toshiba Method of describing object region data, apparatus for generating object region data, video processing method, and video processing apparatus
US6344863B1 (en) * 1999-11-24 2002-02-05 International Business Machines Corporation Three-dimensional GUI windows with variable-speed perspective movement
US6539354B1 (en) 2000-03-24 2003-03-25 Fluent Speech Technologies, Inc. Methods and devices for producing and using synthetic visual speech based on natural coarticulation
US6377712B1 (en) * 2000-04-10 2002-04-23 Adobe Systems Incorporated Iteratively building displacement maps for image warping
US7106887B2 (en) * 2000-04-13 2006-09-12 Fuji Photo Film Co., Ltd. Image processing method using conditions corresponding to an identified person
US6608631B1 (en) * 2000-05-02 2003-08-19 Pixar Amination Studios Method, apparatus, and computer program product for geometric warps and deformations
CA2357289A1 (en) * 2000-09-28 2002-03-28 At&T Corp. Graphical user interface text-based interpolation searching
US7391420B1 (en) 2000-09-28 2008-06-24 At&T Corp. Graphical user interface graphics-based interpolated animation performance
US6765589B1 (en) * 2000-11-16 2004-07-20 Adobe Systems Incorporated Brush for warping and water reflection effects
GB0030148D0 (en) * 2000-12-11 2001-01-24 20 20 Speech Ltd Audio and video synthesis method and system
US20020131651A1 (en) * 2001-01-12 2002-09-19 Chandrashekhara Anantharamu System and method for reducing images including graphs
US20020140682A1 (en) * 2001-03-29 2002-10-03 Brown Frank T. Optical drawing tablet
US6957389B2 (en) * 2001-04-09 2005-10-18 Microsoft Corp. Animation on-object user interface
US8125492B1 (en) * 2001-05-18 2012-02-28 Autodesk, Inc. Parameter wiring
GB0117543D0 (en) * 2001-07-18 2001-09-12 Hewlett Packard Co Document viewing device
US6744974B2 (en) 2001-09-15 2004-06-01 Michael Neuman Dynamic variation of output media signal in response to input media signal
US7126590B2 (en) * 2001-10-04 2006-10-24 Intel Corporation Using RF identification tags in writing instruments as a means for line style differentiation
US6755656B2 (en) * 2001-10-04 2004-06-29 Intel Corporation Method and apparatus for adaptive handwriting teaching system
JP3764087B2 (en) * 2001-11-02 2006-04-05 株式会社モノリス Image interpolation method and apparatus
JP3529373B2 (en) * 2001-11-09 2004-05-24 ファナック株式会社 Work machine simulation equipment
US7747311B2 (en) * 2002-03-06 2010-06-29 Mako Surgical Corp. System and method for interactive haptic positioning of a medical device
US8010180B2 (en) 2002-03-06 2011-08-30 Mako Surgical Corp. Haptic guidance system and method
US7116316B2 (en) * 2002-03-07 2006-10-03 Intel Corporation Audible and visual effects as a result of adaptive tablet scanning
GB2388287B (en) * 2002-05-04 2005-06-15 Autodesk Canada Inc Processing image data
US7176915B1 (en) * 2002-08-09 2007-02-13 Avid Technology, Inc. Subdividing rotation in a character using quaternion interpolation for modeling and animation in three dimensions
US20050071306A1 (en) * 2003-02-05 2005-03-31 Paul Kruszewski Method and system for on-screen animation of digital objects or characters
US7164423B1 (en) * 2003-04-30 2007-01-16 Apple Computer, Inc. Method and apparatus for providing an animated representation of a reorder operation
US7944449B2 (en) * 2003-05-14 2011-05-17 Pixar Methods and apparatus for export of animation data to non-native articulation schemes
US7034836B2 (en) * 2003-05-14 2006-04-25 Pixar Adaptive caching of animation controls
US8456475B2 (en) * 2003-06-30 2013-06-04 Microsoft Corporation Motion line switching in a virtual environment
US7358973B2 (en) * 2003-06-30 2008-04-15 Microsoft Corporation Mixture model for motion lines in a virtual reality environment
US7312805B1 (en) 2003-09-29 2007-12-25 Adobe Systems Incorporated User defined warping tool
US7969447B2 (en) * 2004-05-06 2011-06-28 Pixar Dynamic wrinkle mapping
US7688323B2 (en) * 2004-07-20 2010-03-30 Luxology, Llc Function portions of animation program
US20060022983A1 (en) * 2004-07-27 2006-02-02 Alias Systems Corp. Processing three-dimensional data
US7342586B2 (en) * 2004-09-13 2008-03-11 Nbor Corporation System and method for creating and playing a tweening animation using a graphic directional indicator
US20060164440A1 (en) * 2005-01-25 2006-07-27 Steve Sullivan Method of directly manipulating geometric shapes
US7619628B2 (en) * 2005-06-24 2009-11-17 Microsoft Corporation Caching digital image data
US7554550B2 (en) * 2005-06-24 2009-06-30 Microsoft Corporation Non-destructive processing of digital image data
US7519233B2 (en) * 2005-06-24 2009-04-14 Microsoft Corporation Accumulating transforms through an effect graph in digital image processing
US20060290705A1 (en) * 2005-06-24 2006-12-28 Microsoft Corporation Performing a pre-rendering pass in digital image processing
US20070122773A1 (en) * 2005-11-12 2007-05-31 Du Bois Martin P Activity system for drawing and viewing 3-dimensional images
US8314799B2 (en) * 2007-04-13 2012-11-20 Apple Inc. Enhanced motion behavior framework
US8134558B1 (en) 2007-12-06 2012-03-13 Adobe Systems Incorporated Systems and methods for editing of a computer-generated animation across a plurality of keyframe pairs
US8290757B2 (en) * 2008-06-06 2012-10-16 Pixar Method, system and computer readable media for deforming simulation meshes used in posing animated characters
USD624952S1 (en) 2008-10-20 2010-10-05 X6D Ltd. 3D glasses
USD603445S1 (en) 2009-03-13 2009-11-03 X6D Limited 3D glasses
USD666663S1 (en) 2008-10-20 2012-09-04 X6D Limited 3D glasses
USRE45394E1 (en) 2008-10-20 2015-03-03 X6D Limited 3D glasses
US20100107100A1 (en) 2008-10-23 2010-04-29 Schneekloth Jason S Mobile Device Style Abstraction
CA2684513A1 (en) * 2008-11-17 2010-05-17 X6D Limited Improved performance 3d glasses
US20110205347A1 (en) * 2008-11-17 2011-08-25 X6D Limited Universal 3d glasses for use with televisions
US20110216176A1 (en) * 2008-11-17 2011-09-08 Macnaughton Boyd 3D Glasses With RF Synchronization
US8542326B2 (en) * 2008-11-17 2013-09-24 X6D Limited 3D shutter glasses for use with LCD displays
US20100134499A1 (en) * 2008-12-03 2010-06-03 Nokia Corporation Stroke-based animation creation
US8754889B2 (en) * 2009-03-18 2014-06-17 National Instruments Corporation Cursor synchronization in a plurality of graphs
US8175653B2 (en) 2009-03-30 2012-05-08 Microsoft Corporation Chromeless user interface
USD646451S1 (en) 2009-03-30 2011-10-04 X6D Limited Cart for 3D glasses
EP2425397A4 (en) * 2009-04-27 2015-07-01 Blackberry Ltd Conversion of swf morph shape definitions for vector graphics rendering
EP2425398A4 (en) * 2009-04-27 2014-09-03 Blackberry Ltd Conversion of swf shape definitions for vector graphics rendering
USD672804S1 (en) 2009-05-13 2012-12-18 X6D Limited 3D glasses
USD650956S1 (en) 2009-05-13 2011-12-20 X6D Limited Cart for 3D glasses
US8451277B2 (en) * 2009-07-24 2013-05-28 Disney Enterprises, Inc. Tight inbetweening
US8334888B2 (en) * 2009-08-27 2012-12-18 Apple Inc. Dynamically generated ring tones
US8698747B1 (en) 2009-10-12 2014-04-15 Mattel, Inc. Hand-activated controller
USD671590S1 (en) 2010-09-10 2012-11-27 X6D Limited 3D glasses
USD692941S1 (en) 2009-11-16 2013-11-05 X6D Limited 3D glasses
USD669522S1 (en) 2010-08-27 2012-10-23 X6D Limited 3D glasses
USD662965S1 (en) 2010-02-04 2012-07-03 X6D Limited 3D glasses
CN103038797B (en) 2010-05-25 2016-05-04 田载雄 Animation system and animation method
USD664183S1 (en) 2010-08-27 2012-07-24 X6D Limited 3D glasses
JP5595948B2 (en) * 2011-02-07 2014-09-24 株式会社セルシス Object correction processing apparatus, method and program
US8497852B2 (en) * 2011-09-09 2013-07-30 Dreamworks Animation Llc Minimal parallax coincident digital drawing and display surface
JP5490080B2 (en) * 2011-12-06 2014-05-14 株式会社セルシス Skeleton model attitude control method and program
US9478058B2 (en) * 2012-08-06 2016-10-25 CELSYS, Inc. Object correcting apparatus and method and computer-readable recording medium
USD711959S1 (en) 2012-08-10 2014-08-26 X6D Limited Glasses for amblyopia treatment
JP6361146B2 (en) 2013-05-09 2018-07-25 株式会社リコー Display control program, display control method, display control apparatus, and display system
US9734618B2 (en) * 2013-11-25 2017-08-15 Autodesk, Inc. Animating sketches via kinetic textures
GB2524960B (en) * 2014-04-04 2019-05-15 Imagineer Systems Ltd Processing of digital motion images
WO2016152486A1 (en) * 2015-03-20 2016-09-29 株式会社リコー Display apparatus, display control method, display control program, and display system
JP6558006B2 (en) 2015-03-20 2019-08-14 株式会社リコー Image management apparatus, image management method, image management program, and display system
CN105118079B (en) * 2015-09-17 2018-08-07 网易(杭州)网络有限公司 Animation displacement drawing process, device and motion control method, device
JP6708407B2 (en) * 2015-12-25 2020-06-10 キヤノン株式会社 Image processing apparatus, image processing method and program
US10546406B2 (en) * 2016-05-09 2020-01-28 Activision Publishing, Inc. User generated character animation
KR102023633B1 (en) * 2019-06-13 2019-09-20 주식회사 일루니 Method and apparatus for generating 3d moving model
US10878610B1 (en) * 2019-09-27 2020-12-29 Big Fish Games, Inc. Generating an animation feature from line deformations
KR102180576B1 (en) * 2020-05-18 2020-11-18 주식회사 일루니 Method and apparatus for providing re-programmed interactive content based on user playing
US11769281B2 (en) * 2022-02-01 2023-09-26 Adobe Inc. Vector object transformation

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3510210A (en) * 1967-12-15 1970-05-05 Xerox Corp Computer process character animation
US4189743A (en) * 1976-12-20 1980-02-19 New York Institute Of Technology Apparatus and method for automatic coloration and/or shading of images
US4600919A (en) * 1982-08-03 1986-07-15 New York Institute Of Technology Three dimensional animation
US4797836A (en) * 1986-11-19 1989-01-10 The Grass Valley Group, Inc. Image orientation and animation using quaternions
EP0314250A3 (en) * 1987-10-30 1992-03-04 New Microtime Inc. Video digital analog signal processing and display
SE8801043D0 (en) * 1988-03-22 1988-03-22 Orjan Strandberg GeniMator
US4952051A (en) * 1988-09-27 1990-08-28 Lovell Douglas C Method and apparatus for producing animated drawings and in-between drawings
US5237647A (en) * 1989-09-15 1993-08-17 Massachusetts Institute Of Technology Computer aided drawing in three dimensions
US5029997A (en) * 1989-11-16 1991-07-09 Faroudja Philippe Y C Stop-frame animation system
GB2245807A (en) * 1990-06-28 1992-01-08 Rank Cintel Ltd Editing of object-based animated computer graphics
GB2258790A (en) * 1991-08-12 1993-02-17 Cambridge Animation Syst Animation
EP0559708A1 (en) * 1990-11-30 1993-09-15 Cambridge Animation Systems Limited Image synthesis and processing
US5623428A (en) * 1990-12-25 1997-04-22 Shukyohoji, Kongo Zen Sohozan Shoriji Method for developing computer animation
US5261041A (en) * 1990-12-28 1993-11-09 Apple Computer, Inc. Computer controlled animation system based on definitional animated objects and methods of manipulating same
US5416899A (en) * 1992-01-13 1995-05-16 Massachusetts Institute Of Technology Memory based method and apparatus for computer graphics
FR2695230B1 (en) * 1992-08-26 1994-11-04 Cuadros Isabelle Process for creating animated images.
US5325475A (en) * 1992-09-09 1994-06-28 Massachusetts Institute Of Technology Computer method and apparatus for matching between line drawings
IL104575A (en) * 1993-02-01 1997-01-10 Intex Corp Image communication apparatus
US5590261A (en) * 1993-05-07 1996-12-31 Massachusetts Institute Of Technology Finite-element method for image alignment and morphing
US5590062A (en) * 1993-07-02 1996-12-31 Matsushita Electric Industrial Co., Ltd. Simulator for producing various living environments mainly for visual perception
US5454371A (en) * 1993-11-29 1995-10-03 London Health Association Method and system for constructing and displaying three-dimensional images
JPH0816820A (en) * 1994-04-25 1996-01-19 Fujitsu Ltd Three-dimensional animation generation device
US5511158A (en) * 1994-08-04 1996-04-23 Thinking Machines Corporation System and method for creating and evolving directed graphs

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COMPUTERS AND GRAPHICS, vol. 18, no. 3, 1 May 1994, pages 315-326, XP000546583 JUTTLER B: "VISUALIZATION OF MOVING OBJECTS USING DUAL QUATERNION CURVES" *
PROCEEDINGS OF THE WINTER SIMULATION CONFERENCE, PHOENIX, DEC. 8 - 11, 1991, no. CONF. 23, 8 December 1991, NELSON B L;KELTON W D; CLARK G M, pages 1156-1164, XP000347686 FISHWICK P A ET AL: "USING DISCRETE EVENT MODELING FOR EFFECTIVE COMPUTER ANIMATION CONTROL" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999006961A1 (en) * 1997-08-01 1999-02-11 Avid Technology, Inc. Method for generating 3d animations from animation data
US6011562A (en) * 1997-08-01 2000-01-04 Avid Technology Inc. Method and system employing an NLE to create and modify 3D animations by mixing and compositing animation data
CN101878489B (en) * 2008-05-01 2012-12-05 科乐美数码娱乐株式会社 Image processing device, image processing method

Also Published As

Publication number Publication date
JP4161325B2 (en) 2008-10-08
EP0875042B1 (en) 2000-03-01
US6373492B1 (en) 2002-04-16
JP2007193834A (en) 2007-08-02
DE69606890D1 (en) 2000-04-06
WO1997024696A3 (en) 1997-08-14
AU3235397A (en) 1997-07-28
DE69606890T2 (en) 2000-07-06
US6577315B1 (en) 2003-06-10
JP4048447B2 (en) 2008-02-20
US5854634A (en) 1998-12-29
JP2000502823A (en) 2000-03-07
EP0875042A2 (en) 1998-11-04

Similar Documents

Publication Publication Date Title
WO1997024696A2 (en) Computer-assisted animation construction system and method and user interface
US6559849B1 (en) Animation of linear items
US7068277B2 (en) System and method for animating a digital facial model
Agrawala et al. Artistic multiprojection rendering
US5561745A (en) Computer graphics for animation by time-sequenced textures
US9710951B2 (en) Techniques for processing image data generated from three-dimensional graphic models
US6097396A (en) Method and apparatus for creating lifelike digital representation of hair and other fine-grained images
CA2562657C (en) Apparatus and method for performing motion capture using a random pattern on capture surfaces
Chai et al. Vision-based control of 3 D facial animation
DiPaola Extending the range of facial types
US20030001834A1 (en) Methods and apparatuses for controlling transformation of two and three-dimensional images
Chang et al. Sketching articulation and pose for facial animation
CA2241854C (en) Computer-assisted animation construction system and method and user interface
CA2483943C (en) Computer-assisted animation construction system and method and user interface
Booth et al. Computers: Computers animate films and video: Computers permit spectacular visual effects and take the drudgery out of film cartooning
Qi et al. Quasi-3D cell-based Animation.
Orvalho et al. Character animation: past, present and future
Klein An image-based framework for animated non-photorealistic rendering
Funck Shape deformations based on vector fields
Chaudhuri et al. Stylistic reuse of view-dependent animations
Freiherr von Funck Shape Deformations Based on Vector Fields
Munzner Artistic Multiprojection Rendering
McDonnell et al. Pipeline for Populating Games with Realistic Crowds.
Kondo et al. Directable animation of elastic bodies with point‐constraints
DI FIORE School of Information Technology

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

Designated state(s): AU CA JP KR MX

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

AK Designated states

Kind code of ref document: A3

Designated state(s): AU CA JP KR MX

AL Designated countries for regional patents

Kind code of ref document: A3

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 1996942218

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2241854

Country of ref document: CA

Kind code of ref document: A

Ref document number: 2241854

Country of ref document: CA

WWP Wipo information: published in national office

Ref document number: 1996942218

Country of ref document: EP

WWG Wipo information: grant in national office

Ref document number: 1996942218

Country of ref document: EP