3D Points on Surface of a Pipe (Disk)

In summary, the conversation discusses the need to compute 3D points around the surface of a pipe in a computer program. The solution involves creating points at given arc degrees around a disk and rotating points about the z-axis. The discussion also mentions an alternative solution involving finding 3 points on the cylinder and solving the general equation for a,b,R. The use of matrices is also suggested for achieving any desired rotation. The conversation ends with a request for a "real" example with numbers to check computations.
  • #1
domls
5
0
Hello to all...first post here!

I need to compute 3D (x,y,z) points around the surface of a pipe. By pipe I mean something like an underground pipeline. Let's say I'm given the bottom point of the pipe in x,y,z coordinates, the diameter of the pipe (say 12 feet), and the inclination or slope of the pipe, such as +10 degrees from horizontal, and that the centerline of the pipe is facing 50 degrees Northeast (direction).

What I want to do is compute points at that location around the surface of the pipe, every 20 degrees around the pipe. In other words, I'm looking for a slice, or disk (I'm using the idea of a 'CD' as a section of the pipe). I just want to be able to compute x,y,z points at given arc degrees around the disk, such as every 20 degrees. If the inclination is 90 degrees (horizontal), then the solution is very straightforward. I just create the radius point of the "disk", and then compute my x,y, and z values in a relatively easy manner.

However, if the pipeline is inclined, then the values seem to be much more difficult to compute. I thought of computing the values as if at 90 degrees inclination and then rotating about the z plane, but this method doesn't seem to work.

I am doing this in a computer program to generate polygons that are used by a 3D viewer, to represent pipelines. For instance, if I have two "disks" with computed points around each disk every 20 degrees, I can easily create polygons that connect the two disks, and therefore, I have my 3D representation of the pipeline.

For computing the disk at 90 degrees inclination (horizontal), I have the following code for the first quarter of the disk (in surveying, Northings (N or n) are y, Eastings (E or e) are x, so RPn means the radius point northing or y value, and BottomN means the given bottom point's northing or y value):
RPn = BottomN
RPe = BottomE
RPz = BottomZ + Radius
Rh = Radius

Total = 0
Erase DiskPoints

'Right side of disk, top half
NewAz = AddAz(Azimuth, 90.0#)
For i = 0 To 90.0# Step ArcDeg
ReDim Preserve DiskPoints(Total)

Rh = Radius * Math.Sin(RAD(i))
DiskPoints(Total).Y = RPn + (Math.Cos(RAD(NewAz)) * Rh)
DiskPoints(Total).X = RPe + (Math.Sin(RAD(NewAz)) * Rh)
DiskPoints(Total).Z = RPz + (Math.Cos(RAD(i)) * Radius)

Total = Total + 1
Next

So, any suggestions on how to compute the x,y,z coordinates of points around a disk, if the pipe is inclined?

Thanks, in advance for any and all replies!

domls
 
Mathematics news on Phys.org
  • #2
why isn't rotating the cylinder working?

another solution would be to find 3 points on the cylinder then solving the general eqn of a cylinder for a,b,R : (x-az)^2 + (y-bz)^2 = R^2
 
  • #3
Thanks for your reply!

I'm not sure about my formulas for the rotation. One website had the rotation about the z axis as being x'=x cos q - y sin q, y'= x sin q + y cos q, and z'=z. But I question that z'=z. I also found a web solution that talks about the general case of rotation about an arbitrary axis, but that solution didn't seem to work, at least if I implemented it correctly.

What I could really use is a "real" example with numbers so I can check my computations, in other words, a "one disk" solution. It could be something fairly simple, such as a radius of 10, bottom coordinates of 0,0,0, inclination of 15 degrees, and desired arc angle of every 10 degrees.

domls
 
  • #4
again why doesn't the general rotation work? it must be a mistake in your code because it is a well founded method of rotatiting points in 3space.
 
  • #5
Yes, I agree. However the formula is the question. What formulas would you use to perform the rotation?

domls
 
  • #6
do you know how to work with matrices?

http://mathworld.wolfram.com/RotationMatrix.html

matrices (4),(5), and (6) help you achieve any rotation you want by composing two. be careful the SO(3) group (the collection of all 3d rotation matrices) is not abelian meaning it matters in which order you compose those matrices but your spatial intuition should help you out.

if you don't know how to work with matrices say so and i'll take some time to write something up for you.
 
  • #7
Thanks for your help.

I do know how to work with matrices. Over the years, as a registered professional land surveyor and programmer since 1983, I have developed many subroutines that are used to multiply, add, subtract, transpose, etc, matrices. I have developed least squares subroutines such as best fit line and best fit curve. I have also developed subroutines for NAD27 and NAD83 coordinate projection solutions (lat/long to NAD27/83 and inverse routines). However, as a 20+year programmer, I wonder why others always rely on matrices to perform relatively simple calculations, such as a 3x3 rotation of x,y,z coordinates. Why not simply relate the answer as a formulae solution, as opposed to a matrix solution? Also, I wonder why answers found on the internet routinely use simple 0,1,0 coordinates & -1,0,-1 answers when a real-world example is always much easier to follow.

With this in mind, would it be possible to show a real-world example, starting with a bottom coordinate of 1000x,1000y,100z, a pipe diameter of 12', an inclination of +10 degrees, an Azimuth of 52 degrees, and the need to compute every 10 degrees radially around the disk, and actually show the x,y,z of each computed point?

Thanks!

domls
 
  • #8
is (1000,1000,100) the coordinate of the center of the pipe?
 
  • #9
No, that is the bottom coordinate of the pipe. I can easily compute the RP (radius point) or center of the pipe given the inclination and azimuth.

Thanks.
 
  • #10
please do because for me the problem is ill defined
 
  • #11
Here is a picture tutorial:
http://img138.imageshack.us/img138/226/circlesvectoron8.png [Broken]

It will help a lot if you are comfortable with vectors.
 
Last edited by a moderator:
  • #12
I would like to attempt an answer to your question concerning the (1000, 1000, 100) coordinates. Perhaps this will also shed some light on why you do not get the answers you were expecting.

First of all, in your first post you inferred that you were using an East(X), North (Y), Up (Z) coordinate system. So I’d like to change the coordinates to (1000, 1000, -100) which puts the pipe underground.

Next, per ice109’s recommendation, use the center of the pipe instead of the bottom to indicate the location of the pipe center, and assume that (1000, 1000, -100) are the coordinates of the center. In fact, since we are dealing in this example with only a cross section, let’s talk about a circle and rephrase the problem as:

Suppose we have a 12 unit diameter circle centered in the XZ plane, and suppose that there are points on that circle every 10 degrees measured from the X axis positive towards the Z axis. What will be the coordinates of the points if the they are rotated about the Z axis to an azimuth of 52 degrees , then rotated about the new E axis to an inclination of 10 degrees, then translated to the coordinates (1000, 1000, -100).
A solution to this example is:

1. Use a polar to Cartesian conversion procedure to compose a list of points in the XZ plane every 10 degrees, starting at X axis and moving along the perimeter towards the Z axis.

2. Rotate these points to an azimuth of 52 degrees (a rotation of -52 degrees about the Z axis

3. Rotate these points to an inclination of +10 degrees ( a rotation of +10 degrees about the new E axis).

4. Translate these points 1000 units in the East direction, 1000 units in the North direction, then -100 units in the Z direction.

5. Once everything checks out you can verify that the rotation matrices may be concatenated so that only one is required for the rotations in azimuth and inclination.
The matrices from the Mathematica website are called alias transformations, meaning that when they multiply vectors, the vectors are represented in a rotated coordinate system. This is standard. Since you will be rotating vectors, use their transposes.

My summary of this exposition is that there are 1001 ways to get a sign, an axis, or a matrix wrong here, and I have probably made a mistake myself, since I did not check this whole thing out. However the matrix approach is the only way to go, and it provides you with real power when you model surfaces and use homogeneous coordinates.

PS I've been trying to format this thing using the tab but its not working too well.
 

1. What is the purpose of 3D points on the surface of a pipe (disk)?

3D points on the surface of a pipe (disk) are used to represent the geometric coordinates of points on a cylindrical or disk-shaped object. These points can be used to create a 3D model of the object and aid in visualization, analysis, and design.

2. How are 3D points on the surface of a pipe (disk) calculated?

3D points on the surface of a pipe (disk) are typically calculated using mathematical equations or algorithms based on the dimensions and shape of the object. These calculations involve determining the coordinates of each point in 3D space using the radius, height, and angle of the pipe or disk.

3. What are some applications of 3D points on the surface of a pipe (disk)?

3D points on the surface of a pipe (disk) have various applications in fields such as engineering, architecture, and computer graphics. They can be used to create accurate 3D models for visualization and design, as well as for analysis and simulation purposes.

4. Can 3D points on the surface of a pipe (disk) be manipulated or modified?

Yes, 3D points on the surface of a pipe (disk) can be manipulated or modified using specialized software or programming tools. This allows for the creation of customized designs and simulations based on the specific needs and requirements of a project.

5. Are there any limitations to using 3D points on the surface of a pipe (disk)?

One limitation of using 3D points on the surface of a pipe (disk) is that they only represent the exterior surface of an object and do not contain information about the interior. Additionally, the accuracy of the points may be affected by factors such as measurement errors or the complexity of the object's shape.

Similar threads

Replies
20
Views
3K
Replies
5
Views
2K
Replies
16
Views
3K
  • General Math
Replies
8
Views
2K
  • Introductory Physics Homework Help
2
Replies
43
Views
2K
  • Programming and Computer Science
Replies
3
Views
795
  • General Math
Replies
12
Views
5K
  • Programming and Computer Science
Replies
1
Views
1K
  • Special and General Relativity
Replies
12
Views
1K
Replies
1
Views
729
Back
Top