Previous Next Up Title Contents General Index Functions Index Bookshelf

1.7.3. TRACÉ D'UN CERCLE AVEC 2 AXES LINÉAIRES


	program p73
	include 'PHIGS.H'

	integer circid, scenid, wkid, viewid, xaxid,yaxid, listid(3)
	real viewpt(4)
	data wkid , viewid, scenid, circid / 1,1, 10, 11 /
	data xaxid,yaxid, listid /12,13, 11,12,13/
	data zoom, radius, xc,yc   / 0.8, 5.0, 15.,15. /
	data xmin,ymin, xmax,ymax  / 10.,10.,20.,20. /
	data viewpt /0.,1., 0.,1./

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

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

c	definition du domaine 2D de travail
	call tdoma2 (xmin,ymin, xmax,ymax)

	call taxyln (xaxid, 10.,10.,0., 20.0,0.0)
	call tayxln (yaxid, 10.,10.,0., 20.0,0.0)

c	construction d'un cercle 
	call tccr2 (circid, xc,yc, radius)

	call tscene (scenid,3,listid,viewid)

c	definition d'une vue centree 2D 
	call tv2cen (wkid,viewid,0.5,0.5,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 P71 avec l'affichage de 2 axes. On peut remarquer que les graduations des axes étant en dehors du domaine, il faut légèrement diminuer le zoom pour les voir apparaitre sur le poste de travail.


Previous Next Up Title Contents General Index Functions Index Bookshelf