K3Dcad

a depthmap and stereogram generator


General

This document tells you only, how to use the program. For all other reasons read the files AUTHORS, COPYING, INSTALL and README.

3 steps to a stereogram

  1. Drawing of a 3D wire model.
    This model tells the computer the shape of the object. It has only a surface (you can't look inside, so it's nonesense to draw more). In this program it is made of triangles. But don't worry, there are many tools, so you don't have to draw all triangles yourself.
     
  2. Rendering the depthmap.
    The computer calculates the distances of a base layer to all pixels of all triangles. The result is a grayscale picture, you can see in the 'solutions' part of a stereogram book.
     
  3. Making the stereogram.
    The computer uses the depthmap to make the stereogram. Until now, you can only produce so-called random-dot stereograms.
     
The most time-consuming step is the first. The last 2 steps are done by the computer and take only a few seconds (depending on the size and the machine).

Mouse

Select points and triangles:
Click with the right mouse button on any view and drag a rectangle. All points within this rectangle are processed by the selection operator.
Triangles, hanging on 3 selected points, are also selected. The only exception is the command remove. Here you can remove only fully selected triangles (with 3 selected points) or all triangles with at least 1 selected point.

Enter points:
Just click on the views (except the 3D view) and the point is written into the input field (and [Return] is pressed). The unknown coordinate (the mouse is only 2D) is replaced by 'x' / 'y' / 'z'. So be aware which view you use!

Enter already existing points:
Using snap, you can click on existing points. The computer helps you and uses always the nearest point next to the cursor. This methode can be used in all views (even in the stereogram view!)


Commands

All drawings can (only) be done by the command line. The commands are not case sensitive (except filenames).

Default values are displayer in brackets (<...>). They are used, if you write nothing into the input field. You can finish the input with [Return] or [Space].
The last command is also a default value. Press [Enter] or [Space] to use the last command once again (only the command, not its arguments)

Point format is AutoCAD like:

CAMERA - short: CAM
  Sets the direction (vector) and the target of the camera for the 3D view.
 
Arguments
NameTypeDescription
Direction Vector The direction of the camera. The length of the vector doesn't matter.
Vectors are entered like standard points. They point from (0,0,0) to the entered point.
Target Point The center of the 3D view.
 
CIRCLE - short: C
  Draws a polynom. This command can be used to draw circles, polynoms, pies, stars, ellipses, elliptic polynomes, ...
This command is only a special style of the prisma command with no height ('other center' = 'center').
 
Arguments
NameTypeDescription
Center Point Center of the polynom/circle
Radius Point A point on the radius (1. corner of the polygon)
Layer Point 3. point to define the layer where the polygon is lying. This point will be important, if you want to draw an elliptic polygon/ellipse.
Nodes Number The number of nodes on the radius. 3 will give you a triangle, 4 a square, and so on. For a circle, more than 20 won't be necessary.
Elliptic Yes/No Yes to draw an elliptic polygon. In this case the vectors from the center to the radius and the 3. point are used as new coordinate system to draw the polygon.
Arc Number The angle between start to end3. It is measured from the radius point towards the 3. point. If the angle is smaller than 360 degree, you get a pie. If you use an angle larger than 360 degree, you can get a star (commonly n*360 degree)
 
CLEAN - short: [none]
  Remove duplicate points and triangles
This is useful to speed up drawings and produce smaller files.
 
COPY - short: CP
  Copies the selected objects
 
Arguments
NameTypeDescription
From Point Base point
To Point Target point
 
CUBE - short: [none]
  Draws a cube. It is made out of 2 points. All sides are parallel to the XY-, YZ- or ZX-layer. To draw rotated cubes, use the prisma command.
 
Arguments
NameTypeDescription
1. point Point One corner of the cube
2. point Point The other corner.
 
CUT - short: [none]
  Cut the selected triangles (all if no one is selected) with by layer and removes one side.
 
Arguments
NameTypeDescription
1. point Point 1. point of the layer
2. point Point 2. point of the layer
3. point Point 3. point of the layer (3 points are necessary to define a layer)
side Point a point on the side, which should be kept. If this point is the 1. point (default) both are kept
 
EGG - short: [none]
  Draws an ellipsoid (egg) or a sphere.
 
Arguments
NameTypeDescription
Center Point Center of the ellipsoid
Radius Point A point on the equator
Normal layer Point 3. point to define the layer of the equator
Height Point The north pole (only necessary for ellipsoids)
Nodes Number Number of meridians
Elliptic Yes/No draw an ellipsoid (=Yes) or a sphere (=No)
 
EXPORT - short: EX
  Saves the depthmap / stereogram to a file. After you entered all arguments, a save-dialog appears and asks you for the filename.
 
Arguments
NameTypeDescription
Width Number Width of the picture in pixel (max 32k)
Height Number Height of the picture in pixel (max 32k)
Depthmap Yes/No Yes: save the depthmap instead of the stereogram
Pattern width Number The width of a repeating pattern (in pixel). If you use to large patterns, your stereogram is very 'deep' and it's hard to move your eyes to see something. If you use to small patterns, your stereogram isn't really deep.
For computer monitors 100 is recommended.
If you want to print it at a high resolution, use larger patterns.
 
HELP - short: H
  Lists all commands with a short description.
 
MIRROR - short: [none]
  Mirrors the selected points and triangles (all if no one is selected) with by layer.
 
Arguments
NameTypeDescription
1. point Point 1. point of the layer
2. point Point 2. point of the layer
3. point Point 3. point of the layer (3 points are necessary to define a layer)
Keep old Yes/No Yes: don't delete the original points and triangles
 
MOVE - short: MV
  Moves the selected objects
 
Arguments
NameTypeDescription
From Point Base point
To Point Target point
 
ORIGIN - short: O
  Moves the origin of all views (except 3D). Note that the origin is not measured in pixels and is zoom dependend. It uses the same coordinate system as the object.
 
Arguments
NameTypeDescription
Origin Point Distance from the crossing of the views (center of the window)
 
POINT - short: P, PT
  Draws a single point on the specified place. This command is seldom usefull.
 
Arguments
NameTypeDescription
Point Point The point you want to draw
 
PRISMA - short: [none]
  Draws a prisma. This command can be used to draw cylinders, prismas, 3D-pies, 3D-stars, ellitical cylinders, elliptical prismas, ...
 
Arguments
NameTypeDescription
Nodes Number The number of nodes on the radius. 3 will give you a triangular prisma, 4 a cube, and so on. For a cylinder, more than 20 won't be necessary.
Center Point Center of the base polygon
Radius Point A point on the radius (1. corner of the base polygon)
Layer Point 3. point to define the layer where the base polygon is lying. This point will be important, if you want to draw an elliptic polygon/ellipse.
Other center Point The center of the top polygon. It has the same shape as the base polygon. They are connected with sides.
Elliptic Yes/No Yes to draw an elliptic prisma. In this case the vectors from the center to the radius and the 3. point are used as new coordinate system to draw the base polygon.
Arc Number The angle between start to end3. It is measured from the radius point towards the 3. point. If the angle is smaller than 360 degree, you get a pie. If you use an angle larger than 360 degree, you can get a star (commonly n*360 degree)
 
REMOVE - short: REM
  Removes selected points and triangles.
 
Arguments
NameTypeDescription
Points Yes/No Yes removes all selected points
Touched Triangles Yes/No Yes: triangles, touching at least on selected point, are removed
No: only triangles with 3 selected points (red in your workspace) are removed
 
SCALE - short: SC
  Scales selected points and triangles (all if no one is selected).
 
Arguments
NameTypeDescription
Center Point All points move towards (or away of) this point during scaling
Factor Number Multiplier for the distance center - point.
Negative numbers are considered as 1/x (and have the same effect as positive numbers smaller than 1)
 
SELECT - short: SEL
  Select / Deselect points
 
Arguments
NameTypeDescription
What Word ALL: select all points
TOGGLE: toggle the selection of all points
NONE: deselect all points
 
SELOP - short: [none]
  Sets the selection operator for selections with the mouse
 
Arguments
NameTypeDescription
Operator Word SET: select the points within the mask
XOR: toggle the selection of the points within the mask
CLR: deselect the points with the mask
 
SHOW - short: [none]
  Turn on/off some tools.
 
Arguments
NameTypeDescription
Lines Yes/No Turn on/off the gray lines connecting the points in their different views. Useful for objects with only a few points.
 
SNAP - short: [none]
  Turns on/off snapping points. It helps you for example to say the computer: 'draw a triange with THIS point and THIS point and THIS point' using the mouse.
 
Arguments
NameTypeDescription
Use snap Yes/No (what should I say more?)
Distance Number Only points within this distance (in pixel) from the cursor are used for snapping.
Small distances helps you to create new points, without turning of snapping.
 
TRIANGLE - short: T, TRI
  Draws a single triangle. The necessary points will be set during this command.
 
Arguments
NameTypeDescription
1. point Point 1. point of the triangle
2. point Point 2. point of the triangle
3. point Point 3. point of the triangle
 
VIEW3D - short: VIEW, 3D
  What to show in the 3D screen: nothing, wire model, depthmap, stereogram or any combination (except depthmap and stereogram)
 
Arguments
NameTypeDescription
Wires Yes/No Show a 3D wire model
Depthmap Yes/No Show the depthmap. It's not recommended to use this during drawing on slow machines.
Stereogram Yes/No Show the stereogram. It's not recommended to use this during drawing on slow machines.
 
ZBUFFER - short: ZBUF
  Sets the minimum (black) and maximum (white) height for the depthmap.
The height has the same scale as the x-, y- and z-axes, but it is measured from (0,0,0) towards the camera. So the min/max depends on the camera direction, if the object is not centered on (0,0,0)
 
Arguments
NameTypeDescription
Bottom Number Level of the background layer (black in the depthmap)
Top Number The maximum height. Objects exceeding this level are cut (only in the depthmap)
 
ZOOM - short: Z
  Zooms in/out the workspace.
 
Arguments
NameTypeDescription
Kind Word 'ABS' for absolut zoom: enter the zoom factor directly
'REL' for relative zoom: enter a multiplier of the current zoom factor.
Factor Number The zoom factor. It is used according to your choice for absolute/relative zoom. Negative values are used as quotient (1/x) and have the same effect as positive values smaller than 1.
 

© Nov. 2001, Stephan Dobretsberger