Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 74

Hybrid View

  1. #1
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    Just a wild comment, but to eliminate the "Any time n1 or n2 is an even number, you are squaring the sin() and cos() functions. This causes any negative number they produce into a positive number. There is no way to generate points in the negative quadrants if you have n1^2 or n2^2 positive." problem what would happen if you made the computation use the ABS value?

    I must refer you back to the original source:
    http://paulbourke.net/geometry/torus/

    It shows the results of n1 and n2 being a positive number. n1 controls the shape of the body. If n1 = 2, then the shape is squared up. n2 controls the shape of the cross section.

    OME

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by old man emu View Post

    I must refer you back to the original source:
    http://paulbourke.net/geometry/torus/

    It shows the results of n1 and n2 being a positive number. n1 controls the shape of the body. If n1 = 2, then the shape is squared up. n2 controls the shape of the cross section.
    Yeah, in other words... He faked it. He only generated one quadrant and replicated that in the places the equations did not produce valid results. I can mirror the first quadrant where the equations work to make the other quadrants.
    Last edited by Roxy; 12-04-2014 at 10:15 PM.

  3. #3
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912

    Reply from Dr Bourke

    Here is the reply I got from Dr Bourke.


    > I'm a hobbyist 3D printer and incompetent 3D object creator. At the moment I
    > am trying to get my head around the Open Source program OpenScan.

    I had never heard of that so had a play. Cute.

    > we have ground to a halt

    I don't see how to do it also. What ones needs to be able to do is
    create both the profile as a polygon and then be able to control the
    path through which it is revolved. I could not find out how to do the
    first and the second certainly seems like it isn't supported.

    It is easy to do with a C program, see attached along with
    corresponding slt file. The top of the C program has the parameters
    double r0=1.0,r1=0.25;
    double n1=1.0,n2=0.2;

    Here are the files he sent.

    supertorus.c

    supertorus.stl.zip

    Have fun!!

    OME

  4. #4
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by old man emu View Post
    Here is the reply I got from Dr Bourke.
    > I'm a hobbyist 3D printer and incompetent 3D object creator. At the moment I
    > am trying to get my head around the Open Source program OpenScan.

    > we have ground to a halt

    So, is Dr. Bourke a 3D-Printer hobbyist? Or is that quoted text from you. If he is the hobbyist, the OpenScad source code to do most of his toroid's is up above now....

    Specifically: http://3dprintboard.com/showthread.p...ll=1#post38221

  5. #5
    By way of introduction ... I've been doing 3D printing for almost 20 years, it isn't as new as many people think, just the machines are getting better at the high end and cheaper at the lower end. My main use of 3D printing is as part of data visualisation, printing datasets allowing researchers to explore them in the same way as one explores objects in real life. Some examples from chemistry where researchers here are now 3D printing on a regular basis
    http://paulbourke.net/miscellaneous/molecular_rp/
    And for indigenous Australian rock art where it is now almost a standard part of the recording process
    http://paulbourke.net/miscellaneous/rapidproto/

  6. #6
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    That does work, but for the dummies amongst us, would you go back and comment the code to explain what each module is doing. please?

    OME

  7. #7
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,662
    As it is above it takes over three hours to compile and render on my steam powered P4 which you have to do in order to export the STL.

  8. #8
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    I used Dr Bourke's stl file and sliced it with Slic3r. I had to scale it to get a 75mm diameter torus, 15 cm high. The slice checked out OK with Pronterface.

    Dr Bourke said: " my code is creating a surface whereas Openscad is wanting to work on solids."

    I wonder if that really affects a 3D print. When I sliced his stl, I ended up with the shape, but still had to instruct Slic3r what sort of infill I wanted. OpenSad might indeed work with solids, but in the end, our slicers only look at the coordinates of points on the surface to make the shape.

    Can we have an explanation/definition of
    modified definition of pow() as in "But there is a modified definition of pow() which preserves the sign ... which is in effect achieving the quadrant mappings?

    What values for n0 and n1 ​did you use to create that torus?

    Old Man Emu

  9. #9
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by Paul Bourke View Post
    I must protest, there is nothing fake going on, no mirroring, no special treatment of quadrants. But there is a modified definition of pow() which preserves the sign ... which is in effect achieving the quadrant mappings.
    Yes... This threw us for a loop. The equations specified at:

    http://paulbourke.net/geometry/torus/supertoroid3.gif show these as the equations to generate the toriods:

    supertoroid_equations.gifPerhaps 'fake' is the wrong word. I was trying to say 'not real'. Let's use the word 'imaginary'. I'm pretty confident that most math types would say these equations produce 'imaginary' numbers over part of the range when n1 & n2 are fractional powers.

    So to my point, these equations did *NOT* generate the toriods shown at: http://paulbourke.net/geometry/torus/. You can not pick a fractional number for n1 & n2 and plot the points generated in real space as theta and phi vary from 0 to 2*pi.

    In order to plot these functions in real space it required a redefinition of the pow() function to be something outside of what is commonly accepted as 'correct'.

    Quote Originally Posted by old man emu View Post
    I didn't get a chance to post this bit of Dr Bourke's reply to my emails:

    I don't think the code I gave can be translated to OpenScad, it is after
    all just an implementation of the equations. Openscad does things very
    differently, my code is creating a surface whereas Openscad is wanting
    to work on solids.


    The attached file handles most of the values for n1 & n2 and is written in OpenScad. Rather than modify the pow() function, this code generates the shape in the first quadrant where the equation's values are real and mirrors that to form the rest of the toroid.

    Quote Originally Posted by old man emu View Post
    Welcome to our community Dr Bourke.
    OME


    Agreed....
    Attached Files Attached Files
    Last edited by Roxy; 12-06-2014 at 04:11 PM.

  10. #10
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,662


    Originally Posted by old man emu
    Welcome to our community Dr Bourke.
    OME



    Bit formal isn't it.

    Welcome Peter.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •