[comp.graphics] Mathematica

ray@hydroplane.cis.ohio-state.edu (william c ray) (08/25/89)

(hope both these newsgroups are appropriate here)

So, I went out yesterday, and purchased mathematica for my MacII.
does anyone know what it's good for?  (Ok I can read the instructions,
anyone have any novel ideas, interesting custom packages, hints & tips, 
any idea why I keep crashing out with an id#15 error?)

Thanx
Will Ray

george@altair (John George) (08/28/89)

In article <58589@tut.cis.ohio-state.edu> <ray@cis.ohio-state.edu> writes:
>(hope both these newsgroups are appropriate here)
>
>does anyone know what it's good for?  (Ok I can read the instructions,
>anyone have any novel ideas, interesting custom packages, hints & tips, 
			      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Thanx
>Will Ray

 spirograph[p_Integer, q_Integer, a_, start_:0, opts___Rule] :=
	Block[ {m = (q-p)/q, n = (q-p)/p, x = Cos[start], y = Sin[start]},
        ParametricPlot[{
			x(m Cos[t] + a Cos[n t]) - y(m Sin[t] - a Sin[n t]),
        		y(m Cos[t] + a Cos[n t]) + x(m Sin[t] - a Sin[n t])
			},
        {t, 0, 2 p Pi}, opts, AspectRatio -> Automatic,
        PlotPoints -> 24, Axes->None]
	];
spirograph::usage="spirograph[p, q, a, rot:0, (optionlist)]
displays the spirograph design formed by an outer wheel of
radius one and an inner wheel of radius p/q, with a pen placed 
a units from the center; beginning at start radians above the 
x-axis.";
Null;

Try something like, spirograph[2, 3, .1]; spirograph[2, 3, .15];
and then Show[ %<line number of first output>, %<line number of second output>].
The latter command writes one design over the other.

--John C. George 

chuck@melmac.harris-atd.com (Chuck Musciano) (08/28/89)

In article <58589@tut.cis.ohio-state.edu> <ray@cis.ohio-state.edu> writes:
>So, I went out yesterday, and purchased mathematica for my MacII.
>does anyone know what it's good for?

     You must have a lot more money than we do...  Usually, we do things
in the opposite order :-)

Chuck Musciano				ARPA  : chuck@trantor.harris-atd.com
Harris Corporation 			Usenet: ...!uunet!x102a!trantor!chuck
PO Box 37, MS 3A/1912			AT&T  : (407) 727-6131
Melbourne, FL 32902			FAX   : (407) 727-{5118,5227,4004}

Gee, Beaver, everything that's fun can get you in trouble.  Haven't you
learned that yet? --Gilbert

george@vega (John George) (08/29/89)

In article <58589@tut.cis.ohio-state.edu> <ray@cis.ohio-state.edu> writes:
>(hope both these newsgroups are appropriate here)
>
>So, I went out yesterday, and purchased mathematica for my MacII.
>does anyone know what it's good for?  (Ok I can read the instructions,
>anyone have any novel ideas, interesting custom packages, hints & tips, 
>any idea why I keep crashing out with an id#15 error?)
>
>Thanx
>Will Ray

 spirograph[p_Integer, q_Integer, a_, start_:0, opts___Rule] :=
	Block[ {m = (q-p)/q, n = (q-p)/p, x = Cos[start], y = Sin[start]},
        ParametricPlot[{
			x(m Cos[t] + a Cos[n t]) - y(m Sin[t] - a Sin[n t]),
        		y(m Cos[t] + a Cos[n t]) + x(m Sin[t] - a Sin[n t])
			},
        {t, 0, 2 p Pi}, opts, AspectRatio -> Automatic,
        PlotPoints -> 24, Axes->None]
	];
spirograph::usage="spirograph[p, q, a, rot:0, (optionlist)]
displays the spirograph design formed by an outer wheel of
radius one and an inner wheel of radius p/q, with a pen placed 
a units from the center; beginning at rot radians above the 
x-axis.";
Null;