<p>A <a href="https://en.wikipedia.org/wiki/Prism_%28geometry%29" rel="nofollow">prism</a> is a polyhedron with a polygonal base, another parallel base of the same shape, and joining faces between corresponding edges of the two base faces.</p>

<p>The word "prism" is commonly used to describe a right prism with base faces perpendicular to the joining faces. In this case the joining faces are also rectangles, and so a rectangular right prism is simply a <a href="https://en.wikipedia.org/wiki/Cuboid" rel="nofollow">cuboid</a>.</p>

<p>A cuboid can be described directly, but a simple way to generate one is to start with a cube and use directional <a href="https://en.wikipedia.org/wiki/Scaling_%28geometry%29" rel="nofollow">scaling</a> to give the edges the required lengths.</p>

<p>If the base faces are not perpendicular to the joining faces, this oblique prism can be achieved by applying a <a href="https://en.wikipedia.org/wiki/Shear_mapping" rel="nofollow">shear</a> to a cuboid with the required edge lengths.</p>

<p>So all you need is a parametric description of a cube, and you can go from there to any rectangular prism required.</p>

<hr>

<p>As joojaa points out, there isn't an easy way to describe a prism (including a cube) in just a single parametrisation. You will need to describe each face with a separate set of parametric equations. For example, using parameters u and v, you could describe one of the faces as follows.</p>

<p>$$  x=u  \\  y=v  \\  z=1  \\  0 \leq u \leq 1  \\  0 \leq v \leq 1  $$</p>

CC BY-SA 3.0
2016-05-21T16:19:53.773Z
Thank you for your help, successfully created the prism. :)

I think, set the 8 points manually and draw with triangles is easier solution in this case. I believed it could be solved with a similar parametric equation, like cylinder.

Like you said, first create a cube, and scale it to the proper size solved the problem.
Sanapci
CC BY-SA 3.0
2016-05-21T14:34:32.753Z
2016-05-21T14:50:40.573Z
2016-05-21T14:50:40.573Z
trichoplax is on Codidact now
<p>I have some problem in OSG doing my model, which need an rectangular prism, that I do not know the parametric equation.</p>

<p>I tried to search with the google, but no usable result.</p>

<p>Also tried to draw it by using this site: <a href="http://www.math.uri.edu/~bkaskosz/flashmo/tools/parsur/" rel="nofollow">http://www.math.uri.edu/~bkaskosz/flashmo/tools/parsur/</a></p>

<p>Could somebody help to find the parametric equation for (x,y,z) cordinates</p>

CC BY-SA 3.0
2016-05-21T13:04:33.680Z
There are several different meanings for "OSG". Please could you specify which one this question refers to?
trichoplax is on Codidact now
CC BY-SA 3.0
2016-05-21T13:54:29.767Z
I dont think there is a good equation for a prism as such.
joojaa
<scene-graph>
Rectangular prism parametric equation
Sanapci
# Rectangular prism parametric equation

(Asked by: username_0 on 2016-05-21)

I have some problem in OSG doing my model, which need an rectangular prism, that I do not know the parametric equation.

I tried to search with the google, but no usable result.

Also tried to draw it by using this site: <http://www.math.uri.edu/~bkaskosz/flashmo/tools/parsur/>

Could somebody help to find the parametric equation for (x,y,z) cordinates

**Tags:** scene-graph

> **Comments:**
> **username_1**: There are several different meanings for "OSG". Please could you specify which one this question refers to?  
> **username_2**: I dont think there is a good equation for a prism as such.  

---

## 1 answers

### Answer by username_1 on 2016-05-21. Score: 1

A [prism](https://en.wikipedia.org/wiki/Prism_%28geometry%29) is a polyhedron with a polygonal base, another parallel base of the same shape, and joining faces between corresponding edges of the two base faces.

The word "prism" is commonly used to describe a right prism with base faces perpendicular to the joining faces. In this case the joining faces are also rectangles, and so a rectangular right prism is simply a [cuboid](https://en.wikipedia.org/wiki/Cuboid).

A cuboid can be described directly, but a simple way to generate one is to start with a cube and use directional [scaling](https://en.wikipedia.org/wiki/Scaling_%28geometry%29) to give the edges the required lengths.

If the base faces are not perpendicular to the joining faces, this oblique prism can be achieved by applying a [shear](https://en.wikipedia.org/wiki/Shear_mapping) to a cuboid with the required edge lengths.

So all you need is a parametric description of a cube, and you can go from there to any rectangular prism required.

---

As username_2 points out, there isn't an easy way to describe a prism (including a cube) in just a single parametrisation. You will need to describe each face with a separate set of parametric equations. For example, using parameters u and v, you could describe one of the faces as follows.

$$ x=u \\ y=v \\ z=1 \\ 0 \leq u \leq 1 \\ 0 \leq v \leq 1 $$

> **Comments:**
> **username_0**: Thank you for your help, successfully created the prism. :)  I think, set the 8 points manually and draw with triangles is easier solution in this case. I believed it could be solved with a similar parametric equation, like cylinder.  Like you said, first create a cube, and scale it to the proper size solved the problem.  

---

