Results 1 to 10 of 74
Thread: Need some geometry help
-
11-30-2014, 06:31 AM #1
Need some geometry help
Please take a look at this diagram:
torus1.jpg
It is a diagram of a torus (doughnut, tyre, bangle etc). It can also be shown as in this diagram:
torus3.jpg
which can be rendered as this:
torus4.jpg
Going back to the first diagram,
Ro is the distance from the centre of the the large object (the Origin of these axes) to the point midway between the inner and outer edges of the ring
R1 is the radius of the cross section between the inner and outer rings.
theta is an angle measured anti-clockwise from the X-axis to Ro.
phi is an angle made by the radius measured from origin the X/Z axis of the cross section ( consider the case of theta = 0) to place that cross section.
If theta is know, is it possible to determine phi through geometry?
If it is, please post the steps of your calculation.
Old Man Emu
-
12-01-2014, 12:26 PM #2
This sounds oddly like a homework question your asking for help with.
-
12-01-2014, 01:18 PM #3
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
Please redefine:
phi is an angle made by the radius measured from origin the X/Z axis of the cross section ( consider the case of theta = 0) to place that cross section.
I am struggling to understand what you need.
OK, I think I may have worked out what you are after.
Are you given the X Y Z coordinates of the point where R1 cuts the surface of the toroid? If so then yes it is possible to work out theta.Last edited by Mjolinor; 12-01-2014 at 01:29 PM.
-
12-01-2014, 02:57 PM #4
- Join Date
- Oct 2014
- Posts
- 314
Using theta and Ro you can determine the 2 dimensional position of the center of the cross section using the following and solving for x and y
Sin theta = y/Ro
Cos theta = x/Ro
The same math would determine the 2 dimensional position at the end of Ri on the cross section
Sin phi = y/Ri
Cos phi = x/Ri (this would also be the Z position in the 3d representation)
Finding the 3d x and y positions is a bit more complex and to be completely honest, it's late enough in the day that I don't want to think that hard.
Edit, re-read your post. So theta is given and the x/z/y coordinates where Ri hit the surface are given?
-
12-01-2014, 05:24 PM #5
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
phi = atan(x*cos(theta)/(z-r0)))
I think
probably
ish
Last edited by Mjolinor; 12-01-2014 at 06:09 PM.
-
12-01-2014, 06:15 PM #6
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
Because:
phi(actual) = atan(x/(z-r0))
As apparent z values get reduced as theta increases, the value of phi(viewed) increases, it does this because (z-r0) is apparently shorter.
This apparent shortening follows a cos(theta) ratio
-
12-01-2014, 11:34 PM #7
It's not a homework question. I stopped using pimple cream decades ago. Nor have I enrolled in an Open University course for Seniors.
I'll have to come clean! After nearly 30 years as a policeman, I'm retired now and can engage my mind in solving the really important questions in policing. This thread is about solving the First World policing problem: "How many doughnuts can you get into a pizza box?"
Obviously there is too much wasted space if you try to pack round doughnuts (which are an example of the Torus, a 3D object). My researches lead me to this website http://paulbourke.net/geometry/torus/ where I found the answer to part of my problem - the square doughnut.
According to the author, the general formula for a torus is:
where
ro is the radius of a circle midway between the inner and outer edges of the doughnut.
theta is the angle between the origin of the X,Y plane and ro and ranges from 0 to 2 pi
n1 is a positive number, but for clear representation is usually between 0.1 and 4. It determines the gross shape of the torus. The value used is chosen by the user.
n2 is described similarly to n1 but is not necessarily the same value as n1. It determines the shape of the cross section of the torus. The value used is chosen by the user.
r1 is the radius of the cross section
phi is the angle between the X,Z plane and r1 and ranges from 0 to 2 pi.
With reference to the diagram:
torus1.jpg
consider the case where ro lies along the positive X axis (theta = 0). The circle for the cross section is on X,Z plane. The X coordinate for the centre of the representation of the cross section is (ro + r1). [Its full (X,Y,Z) coordinate would be ((ro + r1),0,0)
Having waded through all of this, and to make the question relevant to 3D design, I suppose I should pose the question:
How do I write this general formula is a way that it will work in OpenScad?
In other words, how do I get OpenScad to automatically use all the values for theta and phi in their respective ranges (0 to 2 pi)?
Old Man Emu
-
12-02-2014, 03:08 AM #8
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
Use rotate extrude.
rotate_extrude(convexity = 10)
translate([2, 0, 0])
circle(r = 1);
-
12-02-2014, 03:30 AM #9
That just makes a round doughnut. I want to make square ones. Scroll down the web page to see what can be done.
By the way, your object looks better when you specify facets (I picked 75 out of the blue.)
$fn = 75;
rotate_extrude(convexity = 10)
translate([2, 0, 0])
circle(r = 1);
-
12-02-2014, 03:51 AM #10
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
rotate_extrude(convexity = 10, $fn=100)
translate([2, 0, 0])
square(r = 1);
Ender 3v2 poor printing quality
10-28-2024, 09:08 AM in Tips, Tricks and Tech Help