l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2009 Apr 01 21:29

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] [OT] Math question: help me make a rainbow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] [OT] Math question: help me make a rainbow

On Wed, 2009-04-01 at 20:19 -0700, Bill Broadley wrote:
> Bill Kendrick wrote:
> > On Wed, Apr 01, 2009 at 10:37:37AM -0700, Harold Lee wrote:
> >>    Not sure if the formulas you've set out do this, but couldn't the rainbow
> >>    tool treat the difference between y coordinates as depth, the way that the
> >>    grass tool does? When y1 == y2, you get a semi-circle with the height ==
> >>    1/2 * abs(x2 - x1), i.e. the radius. Otherwise you get a rainbow with a
> >>    wider base at the point closer to the bottom of the screen that arcs back
> >>    to the other point.
> > 
> > Neat idea, but I worry about kitchensinkness. :)
> How about doing it like xfig, it's really simple just 3 clicks, lets you do
> any kind of arc as you want, I can try it out on my 4 year old if ya want.

He uses the drag-click for the shape tool (drag to set the size and
aspect ratio, click afterwards to set the rotation), so he could use a
drag to set the end points, and a click to set the intermediate point
that the circle has to pass through. Fitting these points to a circle
would be pretty easy [just solve (x-x')^2+(y-y')^2=r^2 for x', y', and
r]. Note that xfig probably uses quadratic splines instead of circles
for their curve tool.

If he wants to make the thickness configurable, he could introduce the
size slider used for the stamp tool for that.


Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.

Attachment: signature.asc
Description: This is a digitally signed message part

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!