
sphere;

sphere stack 5;Stacking is not quite the same as joining, but it is similar.

sphere & box stack 5;
This gave us three spheres and two boxes, since we asked to stack 5 objects high. Stack works on the objects sphere and box in order
/* comment here */ // comment until the end of the line
You can now place a copyright message in you form script, and
have it displayed on the screen when it is encountered, you do this
by putting the text " copyright " on a line with your name, like so
copyright this is a copyright line
Form is blind to spaces, as long as there is at least one space, tab or newline FORM doesn't care how many more there are.

sphere stack 5 in 3;
This will fit 5 spheres into the space that would have been occupied by 3. Another way to compress is

sphere stack 10 in 50%;
This stacked them into 50% of their original space.

sphere stack 10 bend 90;This bent them so that the last one is bent 90 degrees out of position.

box stack 10 twist 45;This twists them around their own axis, similar yet different to bend.

sphere stack 10 twist 360 , 1;
in this case the boxes are twisted but not around their own axes, the second number is the amount of offset.

sphere stack 10 grow 0.1;This "grows" the stack leaving the first item alone, and progressivly "growing" each item until the last is "grown" by the specified amount.
other types of grow are:

powered grow

centered grow

powered centered grow

sphere stack 40 in 75% bend 60 twist 45 grow 1.3;
NOTE: the semi colon at the end , this means that the object is finished, most commands in FORM finish with a semicolon.
If we had entered

sphere stack 40 in 75% bend 60 twist 45 grow 1.3;
We would have got a different form.

torus stack 20 in 25% twistz -90 bend 180; (flip.frm)

All of these have a basic size and shape. But you are not limited to these defaults, you can set your own values for radii/proportions.
For example the word "sphere" creates a sphere with a "radius" of half a unit, the phrase "sphere 1.5", creates a sphere three times as large. This means we can vary the appearance of a sphere so:

sphere & sphere (0.8) stack 10;
Will give a stack of alternating large and small spheres.
box (1.5);

box <0.5 , 1.5 , 0.2>;
NOTE the "<" and ">", these are required.

ellipse; a spherical ellipse

ellipse (0.25); a spherical ellipse 0.25 wide

ellipse (0.5 , 0.1); an ellipse 0.5 wide, 0.1 high (a smartie)

ellipse <1.4 , 0.2, 0.34> an ellipse 1.4 wide, 0.2 high, 0.34 deep. (rugby ball along x axis)

torus;

torus (0.15, 0.6);

cone;

cone (0.3, 0.6);
spacer;
spacer (5);
my_object = sphere stack 10 bend 30;
This defines an object called "my_object", it will not be displayed, to display it you would need a line like:

my_object;
This line actually creates one of my_object for display. Once you have defined an object you can use it anywhere you like - so you can now have:
my_object = sphere stack 10 bend 30;
my_object & box (3);
end;
Not especially useful, but some of the more fun operations can
only be performed using named objects. Another use for named objects
is to speed up display, if you are using a lot of torus or ellipses,
you might use named objects to speed things up like so:
torus stack 30 bend 20;
will take x seconds to display on my machine, so I change the
description to read:
basic_object = ellipse (0.7, 0.5); // min rad+ maj rad = 0.5+ 0.2 = 0.7
this now displays in y seconds. When I am happy with the form I
can now change the first line to read
basic_object stack 30 bend 20;
basic_object = torus (0.2 , 0.5);
and I get my original picture back again.
sphere & (box stack 5) & torus;
and get

ellipse <0.2 , 0.5, 0.2> fan 40 , 180;
The first value after fan is the number of copies to make, just like stack. The second value is the amount of spread to use, 180 is full spread, 90 gives a hemisphere etc.
There is an optional third value, "tightness", this gives "pulls" the individual spikes together, try

ellipse <0.2 , 0.5, 0.2> fan 40 , 180 , 0.1;
remember you can use named objects wherever you had a simple object, so you could try:
sos /* stack of spheres */ = sphere stack 10 bend 20 twist 45;
sos fan 40 , 180 , 0.1;
It starts taking longer doesn't it, but it does look quite complex
(it is; there are now 400 spheres in that picture).
The base in "flagpole.frm" is made from a fan of smartie shaped ellipsoids.
sos /* stack of spheres */ = sphere stack 10;
sob /* stack of boxes */ = box stack 20 bend 20 twist 45;
sos web 3 with sob 4;

there are three more optional values, so for a full web you can get
OBJECT web SPOKE_NUMBER with DEFINED_OBJECT scale SCALE_NUMBER WEBBING_NUMBER hole HOLE_NUMBER excess EXCESS_NUMBER (italic words supplied by you)
so using the above objects "sob" and "sos" we can get

sos web 5 with sob scale(2) 10;
will enlarge the "webbing" to twice its original size.

sos web 5 with sob 10 hole 0.5;
will leave a hole about half the length of the spokes in the middle.

sos web 5 with sob 10 excess 0.5;
will make the webbing continue on past the end of the spokes for a distance of about half the length of the spokes.
see web1.frm, web2.frm and webgood.frm for examples of this.
sphere & spacer & box & spacer stack 20;
delete #
this removes the x'th piece from the form.
and
delete #..#
which removes the x to y'th pieces from the form.
useful for getting rid of clutter.
move< x , y , z>
Moves the whole objects so far x units along the x axis etc. I'm still not very happy about this command, but it might be usefull.
copyright your text here You can put a copyright message in your script, it must be the first non blank item on a line. The whole line is output to the screen. In future versions this message may also be placed in any output file capable of accepting it e.g. as a GIF comment.
sos /* stack of spheres */ = sphere stack 10 bend 20 twist 45 , 0.5;
and we want to put 5 on top of each other:
nicefan = sos fan 10 , 90, 0.1
nicefan stack 5;
that didn't work because fans have no or very little height, we need
to space them a bit.
so try
sos /* stack of spheres */ = sphere stack 10 bend 20 twist 45 , 0.5;
works fine.
nicefan = sos fan 10 , 90, 0.1
spaced_fan = nicefan & spacer (5);
// spacer is radius 5 because if we look closely at sos we can
// guess it's about 5 units tall (10 * 0.5)
// alternatively we could have had
// spaced_fan = nicefan , sos delete 2 // which would have been
// more accurate
spaced_fan stack 5;
a = sphere stack 10 in 10%;
then the join in "a & b" should be virtually indistingushable,
unfortunately it isn't, there's no overlap!
b = sphere stack 10 in 10%;
so we introduce a negative spacer
a & spacer (-0.4) & b;
this then looks OKish. I'll be fixing this problem in a later release.
| © and maintained by Andrew Rowbottom | |
| This page has had | |