I've already worked with this kind of thing:
load 'plot'
pi=: o. 1 NB. definition of PI
cos2=: 4 : 0
NB. syntax: cyclelength cos2 timespan
2 o. (i. y) * +: pi % x
)
plot 100 cos2 100
However, my math skills from 45 years ago aren't enough to figure out
what the cos2 routine should look like for an ellipse instead of a
circle. (I don't even know exactly what the cyclical curve would look
like!) I'm sure the two semidiameters somehow would have to come into
play in the formula (and in the arguments to the verb). I'm presuming
a "vertical" or "horizontal" orientation of the ellipse should make no
difference; if it does, I'll need to know how to deal with both.
Thanks in advance for your assistance!
Harvey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm