point defines a point on the plane.
texture_index is the index (0 or 1) of the texture coordinate to be set. By linking together two texture_map_cut's, two cut planes can be specified.
pull:amount moves the plane by the specified amount opposite the direction of the normal. Modifies the point instance variable.
push:amount moves the plane by the specified amount in the direction of the normal. Modifies the point instance variable.
/* Create two spheres */ sphere_modeller new: asphere radius=10 resolution=4; sphere_modeller new: anothersphere radius=5 resolution=4;
/* Define the filter */
texture_map_cut new: cutter normal=(1,1,1) point=(0,0,0) pull: .1 data_in=asphere ;
texture_map_cut new: cutter2 normal=(-1,-1,-1) point=(0,0,0) pull:.1 data_in=cutter texture_index=1 ;
display_all new: asphere_da data_in=cutter2; display_all new: anothersphere_da data_in=anothersphere;
/* Get the texture that does cutting */ /* File is in lymb/textures */ texture new: atexture file=`cut.texture' read! ;
/* The sphere to be cut */ actor new: anactor texture=atexture modeller=asphere_da ;
/* The other sphere */ actor new: anotheractor scale=(.8,.8,.8) color=(1,1,0) modeller=anothersphere_da ;
renderer new: aren actors=[actor instances?] render! ;
/* Create a scalar for random number */ scalar new: `anum';
/* Spin the cut plane */ cue new: spin duration=1000 tick_actions=` cutter point=(0,0,0); cutter normal= ([anum drand48?],[anum drand48?],[anum drand48?]); cutter normal+ (-.5,-.5,-.5);
' ;
! ascene start!; will get things going scene new: ascene cues=spin renderers=aren;