Entry
Computer: Graphics: File: Format: 3D: Triangle: RAW: How to create triangle RAW format? [Pov-Ray]
Feb 12th, 2006 12:11
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 12 February 2021 - 02:29 pm -------------------
Computer: Graphics: File: Format: 3D: Triangle: RAW: How to create
triangle RAW format? [Pov-Ray]
---
This describes how to create a file containing 3D data in the
the PovRay RAW triangle format
===
The format is:
1. zero or more lines containing 9 triangle coordinates
(these 9 coordinates per triangle *must* all be located on 1 line)
Ax Ay Az Bx By Bz Cx Cz
===
Given a triangle with vertices A, B and C
and its corresponding x, y, z coordinates.
(Ax, Ay, Az)
A
/ \
/ \
/ \
/ \
/ \
B-------------C
(Bx, By, Bz) (Cx, Cy, Cz)
===
e.g. here an example of 1 triangle,
which means 3 points,
and each of this 3 points has an x, y, z coordinate.
Thus for each triangle 3 . 3 = 9 points (has to be on 1 line)
---
Save this file e.g. as
myTest1.raw
--- cut here: begin --------------------------------------------------
0 0 1 -0.44 0 0.78 -0.33 0 1
--- cut here: end ----------------------------------------------------
===
e.g. here an example of 2 parallel plates,
composed of several triangles
Save this file as
myTest2.raw
--- cut here: begin --------------------------------------------------
0 0 1 -0.44 0 0.78 -0.33 0 1
0 0 1 0.33 0 1 0.44 0 0.78
0 0 1 -0.44 0 0.11 -0.44 0 0.78
0 0 1 0.44 0 0.78 0.44 0 0.11
0 0 1 -0.22 0 0.33 -0.44 0 0.11
0 0 1 0.44 0 0.11 0.22 0 0.33
0 0 1 -0.22 0 0 -0.22 0 0.33
0 0 1 0.22 0 0.33 0.22 0 0
0 0 1 0.22 0 0 -0.22 0 0
-0.44 0 0.11 -0.22 0 0.33 -0.22 0 0.11
0.44 0 0.11 0.22 0 0.11 0.22 0 0.33
0 0.44 1 -0.44 0.44 0.78 -0.33 0.44 1
0 0.44 1 0.33 0.44 1 0.44 0.44 0.78
0 0.44 1 -0.44 0.44 0.11 -0.44 0.44 0.78
0 0.44 1 0.44 0.44 0.78 0.44 0.44 0.11
0 0.44 1 -0.22 0.44 0.33 -0.44 0.44 0.11
0 0.44 1 0.44 0.44 0.11 0.22 0.44 0.33
0 0.44 1 -0.22 0.44 0 -0.22 0.44 0.33
0 0.44 1 0.22 0.44 0.33 0.22 0.44 0
0 0.44 1 0.22 0.44 0 -0.22 0.44 0
-0.44 0.44 0.11 -0.22 0.44 0.33 -0.22 0.44 0.11
0.44 0.44 0.11 0.22 0.44 0.11 0.22 0.44 0.33
0 0 0.33 -0.11 0 0.11 -0.22 0 0.33
0 0 0.33 0.11 0 0.11 -0.11 0 0.11
0 0 0.33 0.22 0 0.33 0.11 0 0.11
0 0.11 0.33 -0.11 0.11 0.11 -0.22 0.11 0.33
0 0.11 0.33 0.11 0.11 0.11 -0.11 0.11 0.11
0 0.11 0.33 0.22 0.11 0.33 0.11 0.11 0.11
--- cut here: end ----------------------------------------------------
===
Note:
In this most basic form, this information does not contain color
information.
===
Internet: see also:
---
Computer: Graphics: Link: Overview: Can you give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/39499/fid/818
----------------------------------------------------------------------