Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raytracing the Moebius strip...
#11
Quote:1) Paint one side green and the aother red :lol:
It's possible with raytracing: since there are several intersections between the ray and the strip, you can drive the colour by the rank of the intersection. I'm looking forward seeing thaht, I'm not 100% sure about the result :lol:

Quote:2)draw a line alongside the whole strip and then cut alongside the strip Big Grin
I admit I cannot simulate the scissors with TC-Ray :rotfl:
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply
#12
Hmm... that must be reeeealy complicated to make.... Good luck in your attempts, jark! I cant wait to see the final result

Quote:However, if you do it (and I think you will), you can try to raytrace something like the Esher impossibilities...

Now that would be impressive!! Big Grin
Reply
#13
The first approach I had imagined was in fact too complex, and just did not work!

Here's what I'm trying to prog:

The parametric definition of the moebius strip is:
x = (r + l * Cos(Theta/2) * cos(Theta)
y = (r + l * Cos(Theta/2) * sin(Theta)
z= l * Sin (Theta/2)

So we have:
Tan(Theta)=y/x and Tan(Theta/2)= z! / (SQR(x! * x! + y! * y!) - Radius!)
and
Tan (Theta) = 2 * Tan(Theta/2)/(1 - Tan(Theta/2)^2):

In the raytracer, we're looking for Dist! such as Delta!=0 with:

x! = Rx0! + Rx! * Dist!
y! = Ry0! + Ry! * Dist!
z! = Rz0! + Rz! * Dist!
T1! = y! / x!
T2! = z! / (SQR(x! * x! + y! * y!) - Radius!)
Delta! = T1! - 2 * T2! / (1 - T2! * T2!)

I managed to calculate the intersection in some cases, I'm trying to get it in all the cases... Hope my calculations are correct...

For the normal vector, we must develop the parametric equations into one cartesian equation. The equation is a 6th degree polynomial formula, but since the objective is only to get the derivatives on x, y and z, that's easy...
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply
#14
Now that I finally solved the Sponge problem, I can come back to the Moebius strip...

1) I confirm I'm on the right way now. I should thus get a correct result within a few days

2) I confirm it's complex: finding the roots of the function would be easy if it had always the same shape: that's why I could plot something like 20% of the strip! In the general case, the function has 1 to 5 vertical asymptots, and I'm trying to find a way to find the roots between all the possibilities (the function can increase, decrease, have a minimum or a maximum in most of the intervals).

Hoping this thread will not be closed because of the stupid behaviour we sometimes can have when we post... Cry
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)