Viewing the generic 3D Torso with fat, muscles, lungs and heart
#Example_e5 Viewing the torso # This example creates a full torso model. By selecting and deselecting # different lines and surfaces, the internal layers of the torso may be # easily viewed. gfx read node example body #Read in the nodes for the whole torso gfx read elem example body_heart #Read in the heart elements gfx read elem example body_llung #Read in the elements of the left lung gfx read elem example body_rlung #Read in the elements of the right lung gfx read elem example body_muscle #Read in the elements of the muscle layer gfx read elem example body_fat #Read in the elements of the fat layer gfx read elem example body_torso #Read in the elements of the outer torso gfx create window #Create a 3-D graphics window gfx create material heart diffuse 1. 0. 0. #Create a red material and call it 'heart' gfx create material lungs diffuse 0.9 0.3 0.3 #Create a slightly pink material and call it # ! 'lungs' gfx create material fat diffuse 0.9 0.7 0.0 alpha 0.4 # !Create a yellow shade which is more than # ! half transparent (alpha=0.4) and call it # ! 'fat' gfx create material muscle diffuse 1.0 0.1 0.0 alpha 0.5 # !Create an off red colour which is half # ! transparent and call it 'muscle' gfx create material torso diffuse 0.7 0.7 0.7 alpha 0.3 # !Create a grey colour which is quite # ! transparent and call it 'torso' gfx create surface from heart as heart with 5*5 material heart # !Create the surface of the heart from the # ! group of elements labelled 'heart' in # ! the input file. Call this surface # ! 'heart'. Create the surface # ! using the material 'heart' and use 5*5 # ! polygons to represent each element. gfx create surface from llung as llung with 5*5 material lungs # !Create the surface of the left lung from # ! the group of elements labelled 'llung' # ! in the input file. Call this surface # ! 'llung'. Create the surface # ! using the material 'lungs' and use 5*5 # ! polygons to represent each element. gfx create surface from rlung as rlung with 5*5 material lungs # !Create the surface of the right lung gfx create surface from muscle as muscle with 5*5 material muscle # !Create the surface of the muscle layer gfx create surface from fat as fat with 5*5 material fat # !Create the surface of the fat layer gfx create surface from torso as torso with 5*5 material torso # !Create the surface of the torso layer gfx create lines from heart as heart_lines with 5 #Create the lines on the element boundaries # ! of the heart from the set of elements # ! called 'heart'. Use 5 line segments to # ! represent each line and call the set of # ! lines 'heart_lines' gfx create lines from llung as llung_lines with 5 #Create the lines on the element boundaries # ! of the left lung from the set of # ! elements called 'llung'. Use 5 line # ! segments to represent each line and call # ! the set of lines 'llung_lines' gfx create lines from rlung as rlung_lines with 5 #Create the right lung lines gfx create lines from muscle as muscle_lines with 5 # !Create the muscle lines gfx create lines from fat as fat_lines with 5 #Create the fat lines gfx create lines from torso as torso_lines with 5 #Create the torso lines gfx modify lmodel default twoside #Select a two-sided light model gfx set light default #Select the default light model gfx create light light1 position -1000.0 1000.0 2000.0 direction 0.0 0.5 -1.0 # !Create a spotlight to shine from the # ! specified position in the specified # ! direction with the default beam angle gfx create light light2 position 1000.0 1000.0 2000.0 direction 0.0 0.5 -1.0 # !Create a second spotlight to shine from # ! another position in the same direction # ! with the default beam angle gfx set light light1 #Turn the light model 'light1' on gfx set light light2 #Turn the light model 'light2' on gfx set interest_point 0. 0. 300. #Set the point which will come up in the # ! middle of our graphics window. gfx set view_point 0. -2500. 300. #Set the point we wish to view the torso # ! from gfx set view_twist 1800. #Rotate the up vector 180 degrees so the # ! torso is viewed the correct way up. # ! Works in 1/10 degrees. gfx set far 5000.0 #Set the far clipping plane to be 5000 # ! units away gfx draw lines #Draw the lines for all of the body # ! components gfx draw surfaces name heart #Draw the surface of the heart which is # ! called 'heart' gfx draw surfaces name llung #Draw the left lung surface gfx draw surfaces name rlung #Draw the right lung surface gfx draw surfaces name muscle #Draw the muscle layer surface gfx draw surfaces name fat #Draw the fat layer surface gfx draw surfaces name torso #Draw the outer torso surface gfx #Set the command prompt to be 'gfx'
Name Modified Size
example_e51.com 10-Apr-2000 7.4k body.exnode 27-Oct-2004 297k body_fat.exelem 10-Apr-2000 151k body_heart.exelem 10-Apr-2000 20k body_llung.exelem 10-Apr-2000 47k body_muscle.exelem 10-Apr-2000 151k body_rlung.exelem 10-Apr-2000 47k body_torso.exelem 10-Apr-2000 151k
Name Modified Size
examples_e_e5_e51.tar.gz 19-Aug-2006 147k
Html last generated: Sun Mar 6 05:51:27 2016
Input last modified: Wed Oct 27 16:58:51 2004