Drawings
draw [viewer] &rest thing [function]
-
-
draws things in viewer.
Thing can be any of coordinates, body, face, edge, float-vector,
list of two float-vectors.
If you are running eusx,
(progn (view) (draw (make-cube 10 20 30)))
draws a cube in a xwindow.
draw-axis [viewer] [size] &rest thing [function]
-
-
draws coordinate-axes of things in viewer with size
as the length of each coordinates-axis.
Thing can be any object derived from coordinates.
draw-arrow p1 p2 [function]
-
-
draws an arrow pointing from p1 to p2 in *viewer*.
hid [viewer] &rest thing [function]
-
- draws hidden-line eliminated image in viewer.
Thing can be of face or body.
hidd [viewer] &rest thing [function]
-
-
is same as hid, except that hidd draws hidden lines
with dashed-lines.
hid2 body-list viewing [function]
-
-
Generate hidden-line eliminated image represented by edge-image objects.
The result is bound to *hid*.
render &key bodies faces (viewer *viewer*) (lights *light-sources*)
(colormap *render-colormap*) (y 1.0) [function]
-
-
does ray-tracing for bodies and faces and generates
hidden-surface removed images.
viewing, viewport, and viewsurface are taken from viewer.
lights is a list of light-source objects.
colormap is xwindow's colormap object.
Each of bodies and faces must have color attribute assigned.
This can be done by sending :color message with the name of
color LUT defined in the colormap.
Currently this function works only in Xlib environment.
See examples in demo/renderdemo.l.
make-light-source pos &optional (intensity 1.0) [function]
-
-
make a light-source object located at pos.
intensity is magnifying ratio which multiplies default light
intensity. In order to determine the intensity more precisely,
use :intensity method of a light-source.
tektro file &rest forms [macro]
-
-
opens file for *tektro-port* stream, and evaluates forms.
This is used in order to redirect the output of tektro drawings to a file.
kdraw file &rest forms [macro]
-
-
Kdraw is a macro to produce a [ik]draw-readable postscript file.
Kdraw opens file in :output mode,
makes a kdraw-viewsurface and a viewport with which *viewer* is replaced,
and evaluates forms.
Each of forms is a call to any of drawing functions like draw or hid.
Drawing messages from these forms are redirected to a kdraw-viewsurface,
which transforms the messages into postscript representations
that idraw or kdraw can recognize, and stores them in file.
When idraw or kdraw is invoked and file is opened,
you see the identical figure you drew in a EusViewer window.
The figure can be modified by idraw's facilities,
and the final drawing can be incorporated into a LATEXdocument
using the epsfile environment.
pictdraw file &rest forms [macro]
-
-
Pictdraw is a macro to produce picture files in the Macintosh
PICT format.
pictdraw file &rest forms [macro]
-
-
Pictdraw is a macro to produce picture files for Macintosh
in PICT format.
Pictdraw opens file in :output mode
makes a pictdraw-viewsurface and a viewport with which *viewer* is replaced,
and evaluates forms.
Each of forms is a call to any of drawing functions like draw or hid.
Drawing messages from these forms are redirected to a kdraw-viewsurface,
which transforms the messages into PICT format
that macdraw or teachtext of Macintosh can recognize,
and stores them in file.
hls2rgb hue lightness saturation &optional (range 255) [function]
-
-
Color representation in HLS (Hue, Lightness, and Saturation)
is converted to RGB representation.
HLS is often referred to as HSL.
Hue represents a color around a rainbow circle (from 0 to 360).
0 for red, 45 for yellow, 120 for green, 240 for blue, 270 for magenta,
and 360 again for red, etc.
Lightness is a value between 0.0 and 1.0, representing
from black to white.
The color of lightness value of 0 is always black regardless to
the hue and saturation, and the lightness value 1.0 is always white.
Saturation is a value between 0.0 and 1.0, and represents the
strength of the color.
The greater the saturation value, the divider the color,
and small saturation values generate weak, dull tone colors.
Range limits the RGB values.
If you are using a color display which can assign 8bit value to each of
red, green and blue, range should be 255.
If you use Xwindow, which virtually assigns 16bits integers to RGB,
you should specify range to 65535.
Note the difference between HSV and HLS.
In HLS, vivid (rainbow) colors are defined with lightness=0.5.
rgb2hls red green blue &optional (range 255) [function]
-
-
RGB representation of a color is converted into the corresponding
representation in HLS.
k-okada
2013-05-21