[vox-tech] [OT] Math question: help me make a rainbow
Bill Broadley
bill at cse.ucdavis.edu
Tue Mar 31 22:12:04 PDT 2009
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.
More information about the vox-tech
mailing list