Previous Next Up Title Contents General Index Functions Index Bookshelf

1.7.9. TRACÉ D'UN PARALLÉLÉPIPÈDE AVEC UNE VUE EN PARALLÈLE


	program p79
	include 'PHIGS.H'

	integer wkid, viewid, scenid,cubid,systid, listid(2)
	real viewpt(6)
	data wkid, viewid, scenid  / 1, 1, 10/
	data cubid,systid,listid /11,12, 11,12/
	data zoom                  / 0.8 /
	data xmin,ymin,zmin, xmax,ymax,zmax  / 10.,10.,5., 20.,30.,35. /
	data viewpt /0.,1., 0.,1., 0.,1./

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

c	ouverture de PHIGURE et du poste de travail */
	call topph (6)
	call topwk (wkid,30,8887)

c	definition d'un domaine cubique 3D de travail
	size = max(xmax-xmin,ymax-ymin)
	size = max(size,zmax-zmin)/2.0
	xmid = (xmin+xmax)/2.0
	ymid = (ymin+ymax)/2.0
	zmid = (zmin+zmax)/2.0
	xmindo = xmid - size
	xmaxdo = xmid + size
	ymindo = ymid - size
	ymaxdo = ymid + size
	zmindo = zmid - size
	zmaxdo = zmid + size
	call tdoma3 (xmindo,ymindo,zmindo, xmaxdo,ymaxdo,zmaxdo)

c	construction d'un parallelepipede
	call tcube (cubid, xmin,ymin,zmin, xmax,ymax,zmax)

c	construction du repère avec un type de ligne pointille
	call tcosya (systid, xmid,ymid,zmid ,xmax,ymax,zmax,
     +             'X','Y','Z', 0.1,0.1)

c	insertion d'un attribut PHIGS type de ligne dans la structure 
	call tsln (systid,-1,PLDASH)

c	definition de la scene
	call tscene (scenid,2,listid,viewid)

c	definition d'une vue centree 2D 
	call tv3slz (wkid,viewid,0.5,0.5,0.5,55.,25.,zoom,viewpt)
	
c	trace sur le poste de travail 
	call ppost (wkid,scenid,1.0)
	call prst (wkid,PALWAY)

c	fermeture du poste de travail et de PHIGURE 
	call tclwk (wkid)
	call tclph 
	end

Ce programme est identique au P78, mais les structures sont visualisées avec une vue définie en projection parallèle en remplaçant TV3SPZ par TV3SLZ.


Previous Next Up Title Contents General Index Functions Index Bookshelf