Subject:
|
Re: ANIMATED SPLINE
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Fri, 28 May 2004 13:25:38 GMT
|
Viewed:
|
971 times
|
| |
| |
Here is a section of code:
#declare HOSEANIMATE_dot_ldr = union {
// Untitled
// Name: HOSEANIMATE.ldr
// Author: MLCad
// Unofficial Model
// ROTATION CENTER 0 0 0 1 "Custom"
// ROTATION CONFIG 0 0
object {
_4274_dot_dat
matrix <1-SW/24,0,0,0,1-SW/16,0,0,0,1-SW/16,SW/-3,0,0>
matrix <0,-1,0,0,0,1,-1,0,0,-80,-10,-1>
#if (version >= 3.1) material #else texture #end { Color7 }
}
object {
_4274_dot_dat
matrix <1-SW/24,0,0,0,1-SW/16,0,0,0,1-SW/16,SW/-3,0,0>
matrix <0,-1,0,0,0,1,-1,0,0,80,-10,-1>
#if (version >= 3.1) material #else texture #end { Color7 }
}
object {
_120_dot_dat
matrix <1-SW/20,0,0,0,1-SW/20,0,0,0,1-SW/180,0,0,0>
matrix <0,0,-1,0,1,0,1,0,0,0,0,0>
#if (version >= 3.1) material #else texture #end { Color0 }
}
//
}
#declare ang1=sin(radians(clock))*45+45; //clock 0 to 360 cyclic
object { flexend_dot_dat matrix <1,0,0,0,0,1,0,-1,0,80,-15,0> #if (version >=
3.1) material #else texture #end { Color4 } }
#declare x1=cos(radians(ang1))*-160;
#declare y1=sin(radians(ang1))*-160-30;
#declare x2=x1+sin(radians(ang1))*-60;
#declare y2=y1+cos(radians(ang1))*60;
#include "transforms.inc"
object { flexend_dot_dat matrix
<1,0,0,0,0,1,0,-1,0,0,15,0>rotate<0,0,ang1>translate<x1+80,y1,0> #if (version >=
3.1) material #else texture #end { Color4 } }
#declare flex =
spline {
natural_spline
0, <80,-30,0>
1, <80,-60,0>
8, <x1+80,y1,0>
9, <x2+80,y2,0>
}
#declare flexsection=object { flexsection_dot_dat matrix
<1,0,0,0,1,0,0,0,1,0,0,0> rotate<90,0,0> #if (version >= 3.1) material #else
texture #end { Color4 } }
#declare ctr = 0;
#while (ctr < 8)
#declare yy=flex(ctr).y;
#declare xx=flex(ctr).x;
#declare zz=flex(ctr).z;
object {flexsection Spline_Trans( flex, ctr, y, .5, 1)}
#declare ctr = ctr + .05;
#end
object { HOSEANIMATE_dot_ldr #if (version >= 3.1) material #else texture #end {
Color7 } }
Any questions let me know.
Steve
|
|
Message is in Reply To:
| | ANIMATED SPLINE
|
| Here is a test animation of a flex hose. Used a spline for the path of the hose. (URL) I am really starting to like splines. Enjoy Steve (20 years ago, 28-May-04, to lugnet.cad, FTX)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|