[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1726.0. "Moebius spiral formula ?" by BACHUS::BURTON () Wed Mar 10 1993 06:19

Hi,


	I'm not a mathematician! Don't blame me!

	However, I would like to have the formula for the 
Moebius spiral. I would like to ray-trace it.

	It's difficult to explain but it look like a 
cylinder with no inside and no outside ; this is 
a surface with one side only !!!.

	This formula is welcome in the form:

		formula = 0.


	Thanks in advance,


	Bernard.
T.RTitleUserPersonal
Name
DateLines
1726.1CSC32::D_DERAMODan D'Eramo, Customer Support CenterWed Mar 10 1993 13:4634
> 	It's difficult to explain but it look like a 
> cylinder with no inside and no outside ; this is 
> a surface with one side only !!!.

        This sounds like the "Klein bottle".  If you take a
        rectangle
        
        	e             f              g
               a|----------------------------|c
        	|                            |
               b|                            |b
        	|                            |
               c|----------------------------|a
                g             f              e
        
        and connect the opposite vertical sides so that
        a connects to a, b to b, and c to c, that gives a
        Moebius strip.  I think for a Klein bottle you
        do that as well as connect the opposite horizontal
        sides at e-e, f-f, g-g.  It exists in four dimensional
        space without self-intersection, but it only exists
        in three-dimensional space with self-intersection.
        A Klein bottle has no inside and outside, just one side,
        much like a Moebius strip has only one side.
        
> 	This formula is welcome in the form:
>
> 		formula = 0.

	I take it you want formula to be some function of
        three-dimensional coordinates x,y,z rather than a
        formula embedding it in four dimensional space? :-)
        
        Dan
1726.2Cross referenceCADSYS::COOPERTopher CooperWed Mar 10 1993 15:453
    See note 1468.*

			    Topher
1726.3re : .1 You are absolutely right!BACHUS::BURTONThu Mar 11 1993 02:1015
Dan,


	your description is much more better compared to the  
original note and this is what I need.
	The final product should be like a ring composed of the 
rectangle connected as you described.


	Function of 3D coord. XYZ is exactly the way is it 
implemented in the raytracer that I'm using.

	Can you help me?

	Bernard
1726.43D::ROTHGeometry is the real life!Thu Mar 11 1993 08:5722
    I think an implicit formula is in Francois Apery's book on models of
    the real projective plane (along with formulas for Boy's surface,
    roman surfaces, and other neat objects.)  I have it at home and can
    bring it in if you want that formula.

    You can implicitize the parameterized form in my program (posted earlier)
    by eliminating the trig functions from the equations for x,  y,
    and z, but my program shows the Klein bottle in a somewhat different
    form than the usual inside out Klein bottle (though it is topologically
    correct.)

    For ray tracing, why not just use the parametric form to tessellate
    the surface into triangles and trace those?  You can include normals
    with the triangles, so the shading will be smooth appearing.

    Most ray tracers can efficiently trace large collections of facets.

    Also, the implcit form will still require some range checking to
    eliminate imaginary solutions (I think the Klein bottle will be at
    least a quartic equation...)

    - Jim
1726.5Ok as posted in 1468.* for Klein bottleBACHUS::BURTONMon Mar 15 1993 02:0624
Jim,


	the raytracer I'm using is Persistence of 
Vision 1.0. He is able to render effectively a large 
amount of triangles. 

	I was just requesting the implicit form because 
it also include the feature of encoding quadric or 
quartic formula and the result is much better compared 
with the rendering of triangle.

	I had a look on your Klein bottle program. 
I can certainly use a formula as it appears in your   
program in the create_bottle (x,y,z,lintab) subroutine 
to calculate triangles.


	Many thanks,

	Bernard.


	 
1726.6Here is moebius!BACHUS::BURTONTue Mar 16 1993 04:2357
Jim,


	I've extrapolated the Moebius spiral from a torus 
formula and I've included it in your program.

	Find below the new routine.

	Bye, Bernard.

-------------------------------------------------------------
create_moebius(float x[],
               float y[],
               float z[],
               long lintab[][2])
{
    float a, c, s, d, t, u;
    float wx1, wy1, wx2, wy2;
    int i, j, i1, i2, j1, j2;
    float tfract, wfract;
    float radius;

    tfract = 1.0; /* fraction of turn to construct */
    wfract = 1.0; /* fraction of width to construct */
    radius = 0.3; /* ring radius */

    npts = 0;
    for (i = 0; i <= nrad; i++) {
        u = tfract*twopi*(float)i/(float)nrad;
        for (j = 0; j < nwid; j++) {
            t = ((float)j-.5*(float)nwid)/(.5*(float)nwid);
            t *= wfract*PI;
            z[npts] =sin(u);
            x[npts] = (sin(u/2)*cos(t))+sin(u);
            y[npts] = (cos(u/2)*cos(t))+cos(u);

            x[npts] *= radius;
            y[npts] *= radius;
            z[npts] *= radius;
            npts++;
        }
    }

    nlines = 0;
    for (i1 = 0; i1 <= nrad; i1++) {
        i2 = i1+1;
        if (i2 > nrad) i2--;
        for (j1 = 0; j1 < nwid; j1++) {
            j2 = j1+1;
            if (j2 == nwid) j2--;
            lintab[nlines][0] = nwid*i1+j1;
            lintab[nlines++][1] = nwid*i1+j2;
            lintab[nlines][0] = nwid*i1+j1;
            lintab[nlines++][1] = nwid*i2+j1;
        }
    }
}