MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Please help quick!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4613] Re: Please help quick!
  • From: jlc <jade at darkwing.uoregon.edu>
  • Date: Wed, 21 Aug 1996 03:25:30 -0400
  • Organization: University of Oregon
  • Sender: owner-wri-mathgroup at wolfram.com

On 7 Aug 1996, kirstin wrote:

> I'm looking for a very simple program that makes spirographs.  Preferably Mac, PC in worst case.  Time is of the essence... does anyone have any info???  Thanks!!!!!
> 



R[t_] := {{Cos[t],-Sin[t]},
	  {Sin[t], Cos[t]}}

Spirograph[t1_,t2_,p_]:=
   ParametricPlot[
	Evaluate[{R[t].{t2-t1,0}+R[-(t2-t1)*t/t1].{p,0},R[t].{t2,0}}],
	{t,0,2*Denominator[(t2-t1)/t1]Pi},
		PlotStyle->{{RGBColor[0,0,1]},{RGBColor[1,0,0]}},
		PlotPoints->12*Denominator[(t2-t1)/t1],
		AspectRatio->Automatic]
			

t1 is the radius of the inner circle, t2 is the radius of 
the outer one and p is the distance of the pen from the center of the 
inner circle, of course unlike a real spirograph its possible to make the 
inner circle bigger than the outer. The modification that has the smaller 
circle rotating around the outside of the inner one is fairly simple. You 
should really thank George Mcninch for teaching me this bit of code.

		~joshua



is this machine recording?            


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Printing Landscape
  • Next by Date: Re: Re; Reordering lists?!
  • Previous by thread: Re: Printing Landscape
  • Next by thread: Postfix (//) with Options? (SUMMARY)