To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.rayOpen lugnet.cad.ray in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Ray-Tracing / 2853
2852  |  2854
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
POV Help Needed
Newsgroups: 
lugnet.cad.ray
Date: 
Tue, 22 Jan 2008 00:26:28 GMT
Viewed: 
8020 times
  
I have made a utility that makes minifig head patterns go POV.

For example, the .dat line

4 4 0 15 -13 0 16 -13 -1.750 15.75 -12.652 -1.750 14.75 -12.652

is translated to

cylinder { <0,0,0>,<0,17,0>,13.001
clipped_by {
  union {
    prism {linear_sweep linear_spline 0,14,4
    <0,15>,<0,16>,<-1.750,15.75>,<-1.750,14.75>}
// < other red tri's or quads snipped >
  } rotate <-90,0,0>
}
#if (version >= 3.1) material #else texture #end { Color4 }

Now, all that remains is to translate the primitives, and that's where I need
help.

Here's what the program made out of 3626bp06 (with the right side of the mouth
made red just for trying more than one pattern color) As you can see, the
primitives are not yet translated into inline POV.

0 Minifig Head with Standard Grin, Eyebrows and Microphone Pattern
0 Name: 3626bp06.ldr
0 Author: Franklin W. Cain (fwcain@yahoo.com)
0 LDRAW_ORG Part UPDATE 2005-01
0 // Inline POV code generated by MFHead v0.01

0 KEYWORDS town, launch command, spaceport, headset

0 BFC NOCERTIFY

0 // 2004-04-15 AJW added torus primitives


0 eyebrows
0
0 L3P IFNOTPOV

4 0 -1 7.7 -12.801 -1.400 8.25 -12.722 -2.025 7.8 -12.597 -2.025 7.05 -12.597
4 0 1 7.7 -12.801 1.400 8.25 -12.722 2.025 7.8 -12.597 2.025 7.05 -12.597
4 0 -2.025 7.05 -12.597 -2.025 7.8 -12.597 -3.500 7.5 -12.304 -3.500 6.75 -12.304
4 0 2.025 7.05 -12.597 2.025 7.8 -12.597 3.500 7.5 -12.304 3.500 6.75 -12.304
4 0 -3.500 6.75 -12.304 -3.500 7.5 -12.304 -4.975 7.8 -12.010 -4.975 7.05 -12.010
4 0 3.500 6.75 -12.304 3.500 7.5 -12.304 4.975 7.8 -12.010 4.975 7.05 -12.010
0
4 0 -4.975 7.05 -12.010 -4.975 7.8 -12.010 -5.600 8.25 -11.593 -6 7.7 -11.326
4 0 4.975 7.05 -12.010 4.975 7.8 -12.010 5.600 8.25 -11.593 6 7.7 -11.326
0
4 16 0 4 -13 0 6.75 -13 -4.975 6.75 -12.010 -4.975 4 -12.010
4 16 0 4 -13 0 6.75 -13 4.975 6.75 -12.010 4.975 4 -12.010
4 16 0 6.75 -13 0 7.05 -13 -2.025 7.05 -12.597 -3.500 6.75 -12.304
4 16 0 6.75 -13 0 7.05 -13 2.025 7.05 -12.597 3.500 6.75 -12.304
3 16 -3.500 6.75 -12.304 -4.975 6.75 -12.010 -4.975 7.05 -12.010
3 16 3.500 6.75 -12.304 4.975 6.75 -12.010 4.975 7.05 -12.010
4 16 0 7.05 -13 0 7.7 -13 -1 7.7 -12.801 -2.025 7.05 -12.597
4 16 0 7.05 -13 0 7.7 -13 1 7.7 -12.801 2.025 7.05 -12.597
4 16 0 7.7 -13 0 8.25 -13 -1.400 8.25 -12.722 -1 7.7 -12.801
4 16 0 7.7 -13 0 8.25 -13 1.400 8.25 -12.722 1 7.7 -12.801
3 16 -3.500 7.5 -12.304 -2.025 7.8 -12.597 -4.975 7.8 -12.010
3 16 3.500 7.5 -12.304 2.025 7.8 -12.597 4.975 7.8 -12.010
4 16 -2.025 7.8 -12.597 -1.400 8.25 -12.722 -4.975 8.25 -12.010 -4.975 7.8 -12.010
4 16 2.025 7.8 -12.597 1.400 8.25 -12.722 4.975 8.25 -12.010 4.975 7.8 -12.010
0
4 16 -4.975 4 -12.010 -4.975 7.05 -12.010 -6 7.7 -11.326 -6 4 -11.326
4 16 4.975 4 -12.010 4.975 7.05 -12.010 6 7.7 -11.326 6 4 -11.326
4 16 -4.975 7.8 -12.010 -4.975 8.75 -12.010 -5.600 8.75 -11.593 -5.600 8.25 -11.593
4 16 4.975 7.8 -12.010 4.975 8.75 -12.010 5.600 8.75 -11.593 5.600 8.25 -11.593
4 16 -5.600 8.25 -11.593 -5.600 8.75 -11.593 -6 8.75 -11.326 -6 7.7 -11.326
4 16 5.600 8.25 -11.593 5.600 8.75 -11.593 6 8.75 -11.326 6 7.7 -11.326
0
0 eyes
0
4 16 0 8.25 -13 0 8.75 -13 -4.975 8.75 -12.010 -4.975 8.25 -12.010
4 16 0 8.25 -13 0 8.75 -13 4.975 8.75 -12.010 4.975 8.25 -12.010
0
1 0 -3.5 10 -12.304 1.25 -0.244 0 0 0 -1.25 -0.244 1 0 4-4disc.dat
1 0 3.5 10 -12.304 1.25 0.244 0 0 0 -1.25 0.244 1 0 4-4disc.dat
1 16 -3.5 10 -12.304 1.25 -0.244 0 0 0 -1.25 -0.244 1 0 4-4ndis.dat
1 16 3.5 10 -12.304 1.25 0.244 0 0 0 -1.25 0.244 1 0 4-4ndis.dat
0
4 16 0 8.75 -13 0 11.25 -13 -2.250 11.25 -12.548 -2.250 8.75 -12.548
4 16 0 8.75 -13 0 11.25 -13 2.250 11.25 -12.548 2.250 8.75 -12.548
4 16 -4.750 8.75 -12.060 -4.750 11.25 -12.060 -4.975 11.25 -12.010 -4.975 8.25 -12.010
4 16 4.750 8.75 -12.060 4.750 11.25 -12.060 4.975 11.25 -12.010 4.975 8.25 -12.010
4 16 0 11.25 -13 0 13.875 -13 -4.975 13.875 -12.010 -4.975 11.25 -12.010
4 16 0 11.25 -13 0 13.875 -13 4.975 13.875 -12.010 4.975 11.25 -12.010
0
0 mouth
0
4 4 0 15 -13 0 16 -13 -1.750 15.75 -12.652 -1.750 14.75 -12.652
4 4 -1.750 14.75 -12.652 -1.750 15.75 -12.652 -3.500 15 -12.304 -3 14.2 -12.403
3 4 -3 14.2 -12.403 -3.500 14.5 -12.304 -3.500 15 -12.304
0
4 16 0 13.875 -13 0 15 -13 -1.750 14.75 -12.652 -1.750 13.875 -12.652
4 16 0 16 -13 0 17 -13 -1.750 17 -12.652 -1.750 15.75 -12.652
4 16 -1.750 13.875 -12.652 -1.750 14.75 -12.652 -3 14.2 -12.403 -3 13.875 -12.403
4 16 -1.750 15.75 -12.652 -1.750 17 -12.652 -3.500 17 -12.304 -3.500 15 -12.304
4 16 -3 13.875 -12.403 -3 14.2 -12.403 -3.500 14.5 -12.304 -3.500 13.875 -12.304
4 16 -3.500 13.875 -12.304 -3.500 17 -12.304 -4.975 17 -12.010 -4.975 13.875 -12.010
0
0 microphone
0
1 0 1.500 15.25 -12.702 1.5 0.244 0 0 0 1 0.366 -1 0 4-4disc.dat
1 16 1.500 15.25 -12.702 1.5 0.244 0 0 0 1 0.366 -1 0 4-4ndis.dat
0
4 0 3 14.5 -12.336 3 15.5 -12.336 4.975 14.875 -12.010 4.975 13.875 -12.010
0
4 16 0 13.875 -13.068 0 14.25 -13.068 3 14.25 -12.336 3 13.875 -12.336
3 16 3 13.875 -12.336 3 14.5 -12.336 4.975 13.875 -12.010
4 16 0 16.25 -13.068 0 17 -13.068 3 17 -12.336 3 16.25 -12.336
4 16 3 15.5 -12.336 3 17 -12.336 4.975 17 -12.010 4.975 14.875 -12.010
0
4 0 4.975 13.875 -12.010 4.975 14.875 -12.010 6.950 14.25 -10.690 6.950 13.25 -10.690
0
4 16 4.975 13.125 -12.010 4.975 13.875 -12.010 6.950 13.25 -10.690 6.950 13.125 -10.690
4 16 4.975 14.875 -12.010 4.975 17 -12.010 6.950 17 -10.690 6.950 14.25 -10.690
0
1 0 7.575 13.75 -10.273 0.625 0.622 0 0 0 0.625 0.389 -1 0 4-4disc.dat
1 16 7.575 13.75 -10.273 0.625 0.622 0 0 0 0.625 0.389 -1 0 4-4ndis.dat
0
4 16 6.950 14.375 -10.662 6.950 17 -10.662 9.192 17 -9.192 9.192 14.375 -9.192
4 16 8.200 13.125 -9.884 8.200 14.375 -9.884 9.192 14.375 -9.192 9.192 13.125 -9.192
0
4 0 7.075 13.125 -10.607 8.075 13.125 -9.938 9.192 4 -9.192 8.192 4 -9.860
0
3 16 8.075 13.125 -9.938 9.192 4 -9.192 9.192 13.125 -9.192
4 16 6 4 -11.326 6 13.125 -11.326 7.075 13.125 -10.607 8.192 4 -9.860
4 16 4.975 8.75 -12.010 4.975 13.125 -12.010 6 13.125 -11.326 6 8.75 -11.326
0
0 remainder of face/head
0
4 16 -6 4 -11.326 -6 8.75 -11.326 -9.192 8.75 -9.192 -9.192 4 -9.192
4 16 -4.975 8.75 -12.010 -4.975 17 -12.010 -9.192 17 -9.192 -9.192 8.75 -9.192
0
1 16 0 4 0 13 0 0 0 13 0 0 0 -13 1-8cyli.dat
1 16 0 4 0 -13 0 0 0 13 0 0 0 -13 1-8cyli.dat
0
0 // replacing s\3626bs01.dat
1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3626bs02.dat
1 16 0 4 0 13 0 0 0 13 0 0 0 13 2-4cyli.dat
1 16 0 4 0 0 0 8 0 -6.4 0 8 0 0 t04o6250.dat
1 16 0 4 0 -8 0 0 0 -6.4 0 0 0 8 t04o6250.dat
1 16 0 17 0 0 0 -8 0 6.4 0 8 0 0 t04o6250.dat
1 16 0 17 0 8 0 0 0 6.4 0 0 0 8 t04o6250.dat

0
0
5 24 0 4 -13 0 17 -13 -4.975 4 -12.010 4.975 4 -12.010
5 24 -4.975 4 -12.010 -4.975 17 -12.010 0 4 -13 -9.192 4 -9.192
5 24 4.975 4 -12.010 4.975 17 -12.010 0 4 -13 9.192 4 -9.192
5 24 -9.192 4 -9.192 -9.192 17 -9.192 -4.975 4 -12.010 -12.010 4 -4.975
5 24 9.192 4 -9.192 9.192 17 -9.192 4.975 4 -12.010 12.010 4 -4.975
5 24 -12.010 4 -4.975 -12.010 17 -4.975 -9.192 4 -9.192 -13 4 0
5 24 12.010 4 -4.975 12.010 17 -4.975 9.192 4 -9.192 13 4 0
0
0

1 16 0 4 0 0 0 -8 0 -6.4 0 -8 0 0 t04o6250.dat
1 16 0 4 0 8 0 0 0 -6.4 0 0 0 -8 t04o6250.dat
1 16 0 17 0 0 0 8 0 6.4 0 -8 0 0 t04o6250.dat
1 16 0 17 0 -8 0 0 0 6.4 0 0 0 -8 t04o6250.dat
0

0 L3P ELSEPOV

0   #if (STUDS)
0     difference {
0     cylinder { <0,0,0>, <0,-4,0>, 6 }
0     cylinder { <0,0.01,0>, <0,-4.01,0>, 4 }
0     }
0 #end
0 object { ring3_dot_dat matrix <2,0,0,0,1,0,0,0,2,0,0,0> }
0 object { ring2_dot_dat matrix <2,0,0,0,1,0,0,0,2,0,4,0> }
0 object { _4_dash_4cyli_dot_dat matrix <6,0,0,0,20,0,0,0,6,0,4,0> }
0 object { ring3_dot_dat matrix <2,0,0,0,1,0,0,0,2,0,24,0> }
0 object { _4_dash_4cyli_dot_dat matrix <8,0,0,0,3,0,0,0,8,0,21,0> }
0
0 cylinder { <0,0,0>,<0,17,0>,13.001
0 clipped_by {
0   union {
0     prism {linear_sweep linear_spline 0,14,4
0     <-1,7.7>,<-1.400,8.25>,<-2.025,7.8>,<-2.025,7.05>}
0     prism {linear_sweep linear_spline 0,14,4
0     <1,7.7>,<1.400,8.25>,<2.025,7.8>,<2.025,7.05>}
0     prism {linear_sweep linear_spline 0,14,4
0     <-2.025,7.05>,<-2.025,7.8>,<-3.500,7.5>,<-3.500,6.75>}
0     prism {linear_sweep linear_spline 0,14,4
0     <2.025,7.05>,<2.025,7.8>,<3.500,7.5>,<3.500,6.75>}
0     prism {linear_sweep linear_spline 0,14,4
0     <-3.500,6.75>,<-3.500,7.5>,<-4.975,7.8>,<-4.975,7.05>}
0     prism {linear_sweep linear_spline 0,14,4
0     <3.500,6.75>,<3.500,7.5>,<4.975,7.8>,<4.975,7.05>}
0     prism {linear_sweep linear_spline 0,14,4
0     <-4.975,7.05>,<-4.975,7.8>,<-5.600,8.25>,<-6,7.7>}
0     prism {linear_sweep linear_spline 0,14,4
0     <4.975,7.05>,<4.975,7.8>,<5.600,8.25>,<6,7.7>}
0     prism {linear_sweep linear_spline 0,14,4
0     <3,14.5>,<3,15.5>,<4.975,14.875>,<4.975,13.875>}
0     prism {linear_sweep linear_spline 0,14,4
0     <4.975,13.875>,<4.975,14.875>,<6.950,14.25>,<6.950,13.25>}
0     prism {linear_sweep linear_spline 0,14,4
0     <7.075,13.125>,<8.075,13.125>,<9.192,4>,<8.192,4>}
0   } rotate <-90,0,0>
0 }
0 #if (version >= 3.1) material #else texture #end { Color0 }
0 }
0 cylinder { <0,0,0>,<0,17,0>,13.001
0 clipped_by {
0   union {
0     prism {linear_sweep linear_spline 0,14,4
0     <0,15>,<0,16>,<-1.750,15.75>,<-1.750,14.75>}
0     prism {linear_sweep linear_spline 0,14,4
0     <-1.750,14.75>,<-1.750,15.75>,<-3.500,15>,<-3,14.2>}
0     prism {linear_sweep linear_spline 0,14,3
0     <-3,14.2>,<-3.500,14.5>,<-3.500,15>}
0   } rotate <-90,0,0>
0 }
0 #if (version >= 3.1) material #else texture #end { Color4 }
0 }
0 torus{9,4 clipped_by{difference{box{<-13,4,-13>,<13,-4,13>}
0 cylinder{<0,0,0>,<0,4,0>,9} plane{y,0}}}translate <0,17,0>}
0 plane{y,21 clipped_by{difference{sphere{<0,21,0>,9} sphere{<0,21,0>,8}}}}
0
0 torus{9,4 clipped_by{difference{box{<-13,-4,-13>,<13,4,13>}
0 cylinder{<0,0,0>,<0,-4,0>,9} plane{-y,0}}}translate <0,4,0>}
0 plane{y,0 clipped_by{difference{sphere{<0,0,0>,9} sphere{<0,0,0>,8}}}}
0
0 cylinder{<0,4,0>,<0,17,0>,13}
0
0 L3P ENDPOV
0



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR