Results 1 to 10 of 74
Thread: Need some geometry help
Hybrid View
-
12-04-2014, 06:45 PM #1
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
-
12-04-2014, 07:00 PM #2
Last edited by Roxy; 12-04-2014 at 10:15 PM.
-
12-05-2014, 04:31 PM #3
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
-
12-05-2014, 05:39 PM #4
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
-
12-05-2014, 09:17 PM #5
- Join Date
- Dec 2014
- Posts
- 2
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/
-
12-06-2014, 02:39 PM #6
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
-
12-06-2014, 03:55 PM #7
- 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.
-
12-06-2014, 05:16 AM #8
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
-
12-06-2014, 04:05 PM #9
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'.
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.
Agreed....Last edited by Roxy; 12-06-2014 at 04:11 PM.
-
12-06-2014, 04:15 PM #10
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
Please explain to me how to...
05-17-2024, 12:15 PM in 3D Printer Parts, Filament & Materials