Perspective Tools — Advanced Topics

Below is a list of objects used by some of the custom tools found in and Solid Tools. I maintain it for my own reference, but it may also be of some use to others who are using the tools.

Points:

x-y center

The x and y coordinates of a pre-image point are measured with respect to this point.

z center

The z coordinate of a pre-image point is measured with respect to this point.

image center

This point is the transformation of the origin. The image will rotate about it.

dial

This is the center of the control dial.

black hole

There are quite a few conditional objects used in Solid Tools. They are visible only under certain conditions, particularly when they are turned toward the viewer. Many of them work by dilating a pre-image using a ratio that is either one or undefined. The point black hole is the center of the dilation. It is created by many of the tools that define a plane. Its location in unimportant, and there may be many of them in use at once. Normally this object is automatically hidden at the same time it is constructed.

Angle Measurements:

spin

Rotation about the z-axis

pitch

Rotation about the x-axis

roll

Rotation about the y-axis

 

Scalar Measurements:

distance

This sets the distance from the observer to the origin. When this value is one, the distance is 5 cm.

scale

When this value is one, all points on the plane of the image center will be full-scale.

perspective toggle

0 = orthogonal projection

1 = perspective view

shade depth
shade shift

The measurement shade depth sets the distance between the planes that bookend the shade transition zone. When this value is one, the planes are 5 cm apart.

Measurement shade shift moves the shade transition zone in and out. When it has a value of zero, the zone is centered on the image center. The zone will be shifted by 5 cm times this value.

Note: The shade tools have been archived and are no longer in the Perspective Tools package.

sunx
suny
sunz

These are the components of a unit vector pointing to the light source, which is a point at infinity. The values are defined by the Sundial tool and used only by the parametrically colored solids and faces. solids.

It's on

If the observer is above the plane that was defined with this measurement, then the measurement will be 1. Otherwise, it is undefined. It is used as a dilation ratio, so that an image will vanish when it is turned away from the observer.

It's off

The complement of It's on above, this measurement is 1 when the observer is below the corresponding plane, and otherwise undefined. This as used as a toggle for objects on an interior surface.

normal1
normal2
normal3

These are the components of a normal unit vector for the last plane that was defined. I points outward from the exterior face.

red
green
blue

These are numbers between zero and one. They determine the color value for a point on the surface of a traced solid where the light ray is tangent to the surface. The variable color of the rest of the surface also depends on these values. The values are defined by the Colorbar tool and used only by the traced solids.

sunny
shady

These are numbers between zero and one. On the lighted side of a traced solid, the color is gradually moved from the red-green-blue setting (above) toward white; on the shaded side, it moves toward black. These values determine how close the color can get to white or black. For example, if sunny is set to 1, then at a point where the surface is facing the light and normal to the light ray, the color will be completely white. The values are defined by the Colorbar tool and used only by the traced solids.

ired
igreen
iblue
isunny
ishady

These parameters serve the same purpose as the corresponding parameters in the previous two rows. The only difference is that those with the i prefix apply to the interior surface, as used by the hollow solids and the 2-face tools. The numbers are created by the tool Interior Colorbar and normally are hidden.

 

Custom Controls

These controls work for me, but you may have ideas of your own. Most of the input selections are assumed. The Perspective Setup, Shadebar, Sundial, and Colorbar tools create the objects, give them the necessary labels, and hide them. The hidden points can be overridden by constructing new points with the same names. Try it yourself. First construct a perspective image. Drag it aside. Create a new point, and label it image center. The label must be shown. Now construct a cube. Its image will be centered on the new point. If the label is hidden, the tools will center the next construction on the earlier point.

Java Sketchpad

When creating these tools, I was careful to avoid the commands that are not yet supported by Java Sketchpad. All of the simple constructions can be translated to Java, however the view buttons are presentation buttons and are not yet supported. If you wish to offer different types of views in the same sketch, custom controls will have to be constructed. Java Sketchpad also does not support parametric coloring. Parametrically colored objects will not appear in the Java version, but the edges might appear. Some of these larger files would be completely out of hand if they were converted to Java.

Back to Perspective Tools Manual

Back to Whistler Alley Mathematics


Last update: June 8, 2010 ... Paul Kunkel whistling@whistleralley.com
For email to reach me, the word geometry must appear in the body of the message.