java/awt/Containertargetclearit
SourceFileSpeed =*(Ljava/awt/Component;)Ljava/awt/Component;(Ljava/lang/Runnable;)V
getForeground A-value= toStringsb3sb2sb1
ExceptionsfillOvalstopLineNumberTableloom(D)D
drawStringsize AutopilotrepaintdrawLinestartjava/lang/Stringbvalue
A-value = Ljava/awt/Label;()Ljava/awt/Color;(III)Vomega,(Ljava/lang/String;)Ljava/lang/StringBuffer;getSelectedItem()Ljava/lang/String;Ljava/lang/Object;sinadd(Ljava/awt/Color;)Vjava/awt/Scrollbar B-value =java/lang/InterruptedExceptioninitvalueOfbvaljava/awt/ComponentInteractive
java/awt/Fontjava/lang/StringBuffer()VrunnerSpeed= ()IavaluesetFont()Djava/lang/Threadjava/awt/Label(Ljava/lang/String;II)V
omega.javaGeometry Explorerjava/awt/DimensionclearsaddItemrandomcos MYGALOMORPH GEOMETRY EXPLORER
(First in a K-12 Educational Series to stimulate
students & teachers of art and math.)
- Cliff Pickover, cliff@watson.ibm.com
(I welcome your comments.)
Curves with known names:
A=2, B=2 - Cardioid
A=3, B=3 - Nephroid
A=6, B=6 - Ranunculoid
Consider a race of spider-beings named Mygalomorphs
who spend their days spinning webs upon circular frames.
Status in their society is based on the beauty of their
webs. To create the web patterns, the spiders string a
straight piece of web from one point on the circle to
another. Usually the patterns are dull and uninspiring,
and therefore most spiders are relegated to lower
societal classes.
One day, a rather intelligent Mygalomorph let a
straight web piece amble around the circumference of
the circle, the front end going six times as fast the
rear. In other words, every time the rear of the
straight web moved one space, the front end moved six.
After a few moments' contemplation, the Mygalomorph
realized that by the time the last end has completed
one trip around the circle, the slow end had
traveled just a sixth of the the way around.
His web grew ever more intricate as he continued
weaving. His forelimbs moved back and forth
with lightening speed.
When he stood back and gazed at his creation, it was
not some complicated, meaningless pattern but rather a
five-lobed object which mathematicians on Earth call a
ranunculoid. Amidst the intricate beauty of the strands,
a ghost of the ranuncuolid seemed to materialize as if
out of thin air!
After many experiments, the Mygalomorph
noticed that if one end of its web strand went N
times faster around the circumference of a circle as
its other end, then the web created a curve with
N-1 lobes. So beautiful were his patterns, that the
wise Mygalomorph soon became King of the Spiders.
What strange shapes can you create by hand or by
using this JAVA spider program?
The JAVA program computes the endpoint positions
(x,y) and (x2, y2) of each straight web chord on a
circle. To control the programs, you can alter
the values for variables A and B which allow you to
create an amazing array of spider forms. These two
control parameters control the speed with which one
end of the spider strand moves with respect to the other.
The default figure for example, was created by having one
end of the web go twice as fast as the other (A=2, B=2).
This produces a heart (cardioid) shape amidst an intricate
weave of lines. Try A=3, B=3. It's called a nephroid.
Try different values for A and B such as A=2, B=3.
Although quite beautiful, the points on this fishtail
object do not lie on a circle. Can readers guess what
constants were used to generate the figures in the
autopilot mode? Place the program back in 'Interactive'
mode to play with the sliders.
Of all the web curves produced by this program
the cardioid is the most famous. The cardioid
(meaning heart-shaped) was first studied in 1674
by astronomer Ole Romer who was seeking the best
shape for gear teeth. When a circle rolls around
another circle of the same size, any point on the
moving circle traces out a cardioid. The Greeks
used this fact when attempting to describe the motions
of the planets. Finally, the cardioid is the envelope
of all circles with centers on a fixed circle, passing
through one point on the fixed circle.
What strange new worlds can you create using the
spider programs? What happens when you use ever
larger values for A and B? I would be interested
in hearing from anyone who has discovered parameters
which yield particularly beautiful and novel shapes.
For additional published information on these
curves, contact Cliff Pickover.
If you want to implement this in BASIC, here are
the equations used to determine line end-points:
FOR I=0 TO 360
T=I*P/180.0
X = R*COS(T)
Y = R*SIN(T)
X2 = R*COS(A*T)
Y2 = R*SIN(B*T)
NEXT I
sleeprunjava/awt/TextAreasetColor(I)Ljava/lang/StringBuffer;java/lang/Mathjava/lang/Runnablefloorjava/awt/GraphicsupdatechvallwidthZfillRect(Ljava/lang/String;)Vjava/awt/Choice()Ljava/awt/Dimension;(IIIII)Vpaint&(Ljava/lang/Object;)Ljava/lang/String;
ConstantValueIappendjava/awt/Eventjava/applet/AppletCodespeedholdbholdagetSelectedIndex B-value= height(Ljava/awt/Event;)Zcounter(Ljava/awt/Font;)VavalsetText LocalVariablesLjava/lang/Thread;(J)V
getBackground
4*Y*'=*=1-
*=&*=**YY(D*.;DCIM**M?W*Y*.ȷ*O**O?W*YY(D*B;DCIE**E?W*Y*B2*G**G?W*YY(D*9;DCI@**@?W*Y*92*A**A?WY+L+K+K*+?WMYFNY,2%:-4*?W^&&'/(D)M+s,|-.01235678:")$
J+#+#*O0+#">*MY(D;C-!*.+#*GB+#">*EY(
D;C-!*B**BR*2*8+#*AB+#">*@Y(D;C-!*9**9J*2*8+#k+#HM*+#5 *8* )*UkcNB*UkcN9* **RB**J9*2~
=BMXuz,3;CHkI*>Wdk9*>Tdkk9o99*2(k{o9Pkcc9Qkccc9*BkPkcc9
*9kQkccc9*2h+Y)7+Y)7+
6*2p+Y)7+Y)7+<N*26CSg}
M*S*Y2`2*.LWt<*82*8+*X7+*>W*>T3+*/7*+:*+:& (056;[/+*X7+*>W*>T3+*/7*+:*+:$).t=*+V*2
/YFN+-,+Y)7+ -0*2i*.hLW*2Ҥ1* )*UkcNB*UkcN9*2Ҥ
*8*2>@*2TdFQTf
"2<FTUXbj}!"$(*(,." ?*$*R*J*B*9*F.