DIRECTORY Terminal USING [ Virtual ], Rope USING [ ROPE ], Imager USING [ Context ], ThreeDBasics USING [ Context, ContextProc, ImagerProc, Pair, Pixel, RGB, Triple ]; ColorDisplayRender: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Context: TYPE ~ ThreeDBasics.Context; ContextProc: TYPE ~ ThreeDBasics.ContextProc; Pixel: TYPE ~ ThreeDBasics.Pixel; Pair: TYPE ~ ThreeDBasics.Pair; Triple: TYPE ~ ThreeDBasics.Triple; RGB: TYPE ~ ThreeDBasics.RGB; MappedRGB: PROC[context: REF Context, clr: Pixel] RETURNS[Pixel]; LoadStd8BitClrMap: PROC [vt: Terminal.Virtual]; LoadColorRamp: PROC [ vt: Terminal.Virtual, clr1: RGB _ [0,0,0], clr2: RGB _ [255,255,255], exponent: RGB _ [.43,.43,.43] ]; Draw2DRope: PROC[ context: REF Context, rope: ROPE, position: Pair, color: Pixel _ [255,255,255,0,0], size: REAL _ 20, font: ROPE _ NIL ]; MakeFrame: ContextProc; StuffBuf: ThreeDBasics.ImagerProc; MakeHiResFrame: PROC[ context: REF Context, width, height: NAT, name: Rope.ROPE, keepLog: BOOLEAN _ TRUE ]; DitherImage: PROC[dstContext, rgbContext: REF Context]; Orbit: PROC[ context: REF Context, lookingFrom, lookingAt, axis, base: Triple, moveEPNotCI: BOOLEAN _ TRUE, framesPerRev: NAT _ 16, startAt: NAT _ 0, endAt: NAT _ 32767, filename: Rope.ROPE _ NIL ]; MakeFramesFromTo: PROC[ context: REF Context, lookingFrom, lookingAt, toLookingFrom, toLookingAt: Triple, framesOnLine: NAT, startAt, endAt: NAT _ 0, filename: Rope.ROPE _ NIL ]; MakeFramesOnPath: PROC[ context: REF Context, lookingFrom, lookingAt: LIST OF Triple, framesOnPath: NAT, startAt, endAt: NAT _ 0, filename: Rope.ROPE _ NIL, closed: BOOLEAN _ TRUE ]; END. κColorDisplayRender.mesa Last Edited by: Crow, December 4, 1987 7:28:30 pm PST Types Colors Calculates pseudocolor value from RGB and leaves in red field Sets up custom 6x6x6 color cube map for dithering Load ramp running between two colors and bent by exponent, defaults give std grey map Low-level drawing Put a string of characters on the screen Frame Generation and Animation Compute image described by context Transfer buffered image to viewer or imager context Load context.viewPort from viewer specification Compute image described by context at supplied size, write out to named AIS file, keeps log Take rgb image in rgbContext and dither into dstContext Calculate elliptical orbit about center of interest (or eyepoint if moveEPNotCI is FALSE), write images to series of numbered files if filename # NIL Calculate and display (if a displayed context) frames along a straightline path Calculate and display (if a displayed context) frames along a cubic path through control points Κ“˜headšœ™Jšœ5™5defaultšΟk ˜ Jšœ œ ˜Jšœ œœ˜Jšœ œ ˜Jšœœ0œ ˜S——head2šœœ ˜%J˜Jšœ˜J˜—head3šΠbi™Iunitšœœœ˜Lšœ œ˜%Lšœ œ˜-Lšœœ˜!Lšœœ˜Lšœœ˜#Jšœœœ˜—šΟb™aš ΠbnΟnœœ œœ˜AP™>—š‘œœ˜/P™3—š ‘ œœœœ$œ˜„P™V——šŸ™š‘ œœ œœCœ œœ˜“J™(——šŸ™š‘ œ˜J™#—š‘œ˜"P™3J™/—š‘œœ œœ œœœ˜vJ™[—š‘ œœœ ˜7JšœΟcœ ’™8—š‘œœ œJœœœœ œœœ ˜αJšœ•™•—š‘œœ œkœœ œœ˜ΤJ™O—š‘œœ œ"œœ#œœ œœœœ˜ΝJ™_—N™—Jšœ˜—…—Τ Q