l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2009 Apr 01 17:15

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



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.

On Tue, Mar 31, 2009 at 10:12 PM, Bill Broadley <bill@cse.ucdavis.edu> wrote:
Bill Kendrick wrote:
> On Tue, Mar 31, 2009 at 07:21:36PM -0700, Bill Broadley wrote:
>> Some.  Not sure what you are getting at though.  You want to draw 180 degrees
>> of a circle with the end points defined by p1 and p2?  What if you want to
>> make an upside down rainbow?  Or 1/2 of one?
>
> I only want to draw all 180 degress if y1==y2.  Otherwise, it'd be
> less of the arc.  (See my ASCII diagrams)

Hrm, I don't think ascii is going to help, at least for me.  Ah, ok, I have an
idea of what you think you want to do.  I think you do need 3 points.  A
center, radius, range of angles.  Basically there are an infinite number of
180 degree curves that go through 2 points, and there's no way to know how
high the peak should be, nor which exact fraction of a circle to display.

So for your diagrams how do you decide that in case 1 you do 1/2 a circle and
the circle doesn't go above P2, but in case #3 you get 60% of a circle.
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
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!