POV-Ray : Newsgroups : povray.newusers : Stuck with circle-maths : Stuck with circle-maths Server Time
2 Nov 2024 17:20:49 EDT (-0400)
  Stuck with circle-maths  
From: Mark Hanford
Date: 20 Oct 2003 20:00:52
Message: <3f947734$1@news.povray.org>
Hi there,

I'm a bit stuck at the moment on a problem that requires some circular
thinking ;)

I have a point A which lies on the circumference of a circle (oriented x-z
like a default torus).
I need point B to lie on the circle as well, but a fixed distance above it.
I have found various solutions using my somewhat dusty trig memory, but they
all fall down in various cases.

If my explanation is a bit vague, render the bit of scene at the end of the
message.
I know the location of the red point. I know the length of the yellow bar.
I can't find the coord for the green point.
(The the red point will never be in such a location that Spot+Bar > Radius)

union{torus{10,0.3} cylinder{-10*x, 10*x, 0.3} cylinder{-10*z, 10*z,
0.3}pigment{color rgb 1}}
sphere{0,1 pigment{color red 1} translate vrotate(10*x, 75*y)}
sphere{0,1 pigment{color green 1} translate vrotate(10*x, 28*y)}
cylinder{0,5*z,0.5 pigment{color rgb<1,1,0>} translate vrotate(10*x, 75*y)}
cylinder{5*z,<5.9,0,5>,0.5 pigment{color rgb<0,0,1>} translate vrotate(10*x,
75*y)}
global_settings{ambient_light color rgb 1}
light_source{<-20, 40, -20> color rgb 1}
camera{location 30*y look_at 0}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.