###### Descriptions and Examples for the POV-Ray Raytracerby Friedrich A. Lohmüller     POV-Ray Examples - How To Make Objects for POV-Ray
Italiano
Français
Deutsch

Home
- POV-Ray Tutorial
- POV-Ray Examples
Index of Content
- Geometry
- Architecture
- Engineering
- Pylons
- Railing
- Bridge
- Tubes
- Tube Fork
- Tube Stopcock
- Chain
- Coil of Wire
- Torpedo
- Cruise Missile
- Rocket
- Wheel
- Truck
- Propeller
- Airplanes
- Canoe
- Guitar Body
- 7-Segment Display
- Ribbon Cable
- Cable Harness

Torpedo

###### Objects: box, cylinder. Methods: #declare, #local, union, #macro, #while.

How to Make a Torpedo:

Step 1: The Body
We buildt the body by two ellipsoids (red)
and a cylinder (yellow) all with the same radius:

```sphere { <0,0,0>, 0.5
scale<1.5,1,1>
}  // end of sphere ------

cylinder{ <-4,0,0>,<0,0,0>,0.5
} // end of cylinder -----

sphere { <0,0,0>, 0.5
scale<  5,1,1>
translate<-4,0,0>
}  // end of sphere ------```

Step 2: The Wings
2.0: We call this a "Wing":

```#declare Wing =
```
2.1: We take a cone,

```cone { <0,0,0>,0.75,<0,1.00,0>,0.35
```

2.2: we shrink it in z direction by

```       scale <1,1,0.1>
```

2.3: we shear it in x direction by

```       matrix<  1  , 0, 0,
-0.25, 1, 0,
0  , 0, 1,
0  , 0, 0>
```

2.4: and we close the cone:

```      } // end of cone -----
```

2.5: Now we bundle 4 wings,
rotating them around the x axis:

```union{
object{ Wing rotate<0*90,0,0>}
object{ Wing rotate<1*90,0,0>}
object{ Wing rotate<2*90,0,0>}
object{ Wing rotate<3*90,0,0>}
```

2.6: and move them at their position at the end of the tail:

```  translate<-5.55,0,0>
} // end of union
```

### Step 3: All together:

##### Scene file for a Torpedo in POV-Ray: "torpedo.txt" or "torpedo.pov"

top
 © Friedrich A. Lohmüller, 2009 www.f-lohmueller.de