- #1

- 5

- 0

## Main Question or Discussion Point

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

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