PHLV5 Scheme Example 2

From DocR21

Jump to: navigation, search

This demonstrates Precise Hidden Line Removal V5 using occurrences. Each occurrence has a transformation. The choices over what colors and line styles to use is made by Scheme AIDE, but made possible by the data generated by Precise Hidden Line Removal V5.

(define b1 (solid:cylinder (position 0 0 -15) (position 0 0 15) 5) )
(entity:set-color (entity:edges (part:entities)) BLACK)
(entity:set-color (entity:faces (part:entities)) GREEN)
(env:set-default-color BLACK)
 
(view:gl 0 0 260  228)
(view:set-eye (position  0.023179  -39.821346  11.532967))
(view:set-target (position  0  0  0))
(view:set-up (gvector  -0.002067  0.278184  0.960525))
(view:set-size  34.824560  34.824560)
(view:edges ON)
(view:set-bg-color WHITE)
(view:refresh)
 
(system:sleep 2000)
 
(view:refresh) (view:refresh)
(phlv5:compute)
(system:sleep 2000)
 
(define t1 (transform:rotation (position 0 0 0) (gvector 0 1 0) -45) )
(define t2 (transform:compose (transform:rotation (position 0 0 0) (gvector 0 1 0) 45) (transform:translation (gvector 0 6 0)) ) )
(phlv5:compute  (list (cons b1 (list t1 t2))))
Image:ACIS_phlv5_cyl_shaded.PNG Union of a block and a cylinder
This shows the original model, a cylinder.
Image:ACIS_phlv5_cyl_HLR.PNG HLR
The same model with hidden lines removed (HLR).
Image:ACIS_phlv5_cyl_2_occur_HLR.PNG HLR with transformed occurrences
Two occurrences of the same model, each rotated a different amount, with hidden lines removed (HLR).
Personal tools
Live