Previous Next Up Title Contents Index Functions Index Top Library

1.7.7. DRAWING A PARALLELEPIPED ON 2 WORKSTATIONS

	program p77
	include 'PHIGS.H'

	integer wkid1,wkid2, viewid, scenid,cubid,systid, listid(2)
	real viewpt(6)
	data wkid1,wkid2, viewid, scenid  / 1,2, 1, 10/
	data cubid,systid,listid /11,12, 11,12/
	data zoom                  / 1.0 /
	data xmin,ymin,zmin, xmax,ymax,zmax  / 10.,10.,5., 20.,30.,35. /
	data xmid,ymid,zmid /15.,20.,20./
	data viewpt /0.,1., 0.,1., 0.,1./

c---------------------------------------------------------------------

c	open PHIGURE */
	call topph (6)

c	define 3D working domain
	call tdoma3 (xmin,ymin,zmin, xmax,ymax,zmax)

c	build parallelepiped
	call tcube (cubid, xmin,ymin,zmin, xmax,ymax,zmax)

c	build dotted line-type reference
	call tcosya (systid, xmid,ymid,zmid ,xmax,ymax,zmax,
     +             'X','Y','Z', 0.1,0.1)

c	insert a PHIGS-type line attribute in the structure 
	call tsln (systid,-1,PLDASH)

c	define scene
	call TSCENE (scenid,2,listid,viewid)

c	display on first workstation
	call topwk (wkid1,30,8887)
	call tv3spz (wkid1,viewid,0.5,0.5,0.5,55.,25.,3.0,zoom,viewpt)
	call ppost (wkid1,scenid,1.0)
	call prst (wkid1,PALWAY)

c	display on second workstation
	call topwk (wkid2,30,8887)
	call tv3spz (wkid2,viewid,0.5,0.5,0.5,75.,25.,3.0,zoom,viewpt)
	call ppost (wkid2,scenid,1.0)
	call prst (wkid2,PALWAY)

c	close workstations and PHIGURE 
	call tclwk (wkid1)
	call tclwk (wkid2)
	call tclph 
	end

To create images of the same objects on 2 different windows, open two workstations. The dimensions of the windows are defined in the GPHIGS.def file read when PHIGURE is opened.

This program defines a different image of the VIEWID view index on each of the workstations. This is used to display the same objects from two different angles.


Previous Next Up Title Contents Index Functions Index Top Library