Normally contour_filter is controlled by setting a min/max scalar range plus a number of contour lines. It is also possible to explicitly set the values for the contour lines with the "values=" method.
no_contours the number of contour lines to generate between the specified range.
no_contours?/number_contours? get the maximum number of contour lines between specified range.
range= (min,max) sets the range to generate contour lines within.
range? get the range.
values= (v1,v2,v3,...,vn) explicitly set the scalar values from which to generate contour lines.
/* * Script to generate contour lines around cube */ vector new: v dimension = 72 + (.3,.7,1) ;
-- unit cube - scalar values are edge distances from point at origin display_data new: dd points=(0,0,0, 0,0,1, 0,1,1, 0,1,0, 1,0,0, 1,0,1, 1,1,1, 1,1,0) polygons=(4,1,2,3,4, 4,1,2,6,5, 4,2,3,7,6, 4,5,6,7,8, 4,1,4,8,5, 4,3,7,8,4) scalars=(0,1,2,1,1,2,3,2) normals=v ;
contour_filter new:cont_filt data_in=dd range=(0,3) number_contours=10 ;
/* * Draw the contour lines */ display_all new: draw_cont_lines data_in=cont_filt range=(0,3) ; actor new: cont_lines_actor modeller=draw_cont_lines ; /* * Draw the cube */ display_all new: draw_surface data_in=dd range=(0,3) ; actor new: surface_actor modeller=draw_surface wireframe! ; /* * Graphics stuff */ environment new: _env variable="LYMB_RENDERER"; string new: current_renderer = [_env value?];
light new: alight on!;
vector new: bbox dimension=6; bbox = ([dd bounds?]); camera new: acamera position=(1,1,1) x_range=([bbox @1 ?],[bbox @2 ?]) y_range=([bbox @3 ?],[bbox @4 ?]) z_range=([bbox @5 ?],[bbox @6 ?]) default! on! ;
object# current_renderer new: main_renderer actors=([actor instances?]) lights=alight cameras=acamera ;
main_renderer render!;