|
|
#1 |
|
Senior Member
Join Date: Oct 2003
Posts: 272
|
Raytracing Space Curves...
Ok so I had a few new ideas but I'm not sure if they are even possible. I was thinking about raytracing space curves (by that I mean tracing the ray until it is a certain distance from the space curve). I guess this could get really nasty going down with derivatives to find the closest value of t... But technically you could setup the distance equation and take the derivative and solve for t in terms of x,y,z to find the closest point... Hmm the more I type this out the more I become aware of how complicated this could get if I use a complex equations... Any thoughts on this idea? UnConeD?
Ex. Say I had the following for my curve: (cos(t), sin(t), 0) then the distance for that is: f(t)=((x-cos(t))^2+(y-sin(t))^2+z^2)^(1/2) take the derivative in terms of t and you get: f'(t)=(sin(t)x-cos(t)y)/f(t) if you set that equal to zero and solved for t you'd get: t=atan(y/x) Which makes sense if you think about it. Then you could plug that back into to get the distance and set a threshold value like raytracing metaballs. That's a really simple equation and it could get pretty difficult if you try and use complicated space curves but I think it's a plausible idea. |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|