File: model

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (57 lines) | stat: -rw-r--r-- 1,461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 20aug04abu
# (c) Software Lab. Alexander Burger

Sym Val -> Model list:
(
   pos.x pos.y pos.z                                              # Position
   rot.a.x rot.a.y rot.a.z                                        # Orientation
   rot.b.x rot.b.y rot.b.z
   rot.c.x rot.c.y rot.c.z
   sym                                                            # Submodel
   ..
   (col1 col2 ["text"]  p1.x p1.y p1.z  p2.x p2.y p2.z ..)        # Face
   ..
   sym                                                            # Submodel
   ..
   (col1 col2  p1.x p1.y p1.z  p2.x p2.y p2.z  p3.x p3.y p3.z ..) # Face
   ..
)

<col> <col>    # Both sides visible
<col>  NIL     # Backface culling
 NIL  <col>    # Foreside culling
 NIL   NIL     # Transparent
 NIL    T      # Shadow


Transmission format:
   hor sky gnd
   cnt  x y z  "text"  x y z  x y z  ..  col
   cnt  x y z  NIL  x y z  x y z  x y z  ..  col
   ..
   0 32767 | 0 snx sny

Transmission size:
   (4 + 2 * polygons + 3 * points) * 4 bytes


Polygon design rules:

- All polygons should be convex
  (split concave polygons if necessary)

- Points loop right when seen from the front side
  (if the two faces should have different colors)

- The first three points must not be on a straight line
  (to allow the calculation of the normal vector)

- The first point cannot be the local origin
  (if 'aRot' is to be used)


z3dField .graf
((x y . "string") ..)

Transmission format:
   cnt  x y "string" ..