Previous Next Up Title Contents Index Functions Index Top Library

1.7.3. DRAWING A CIRCLE WITH 2 LINEAR AXES

	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	open PHIGURE and X-window type workstation (8887)*/
	call topph (6)
	call topwk (wkid,30,8887)

c	define 2D working domain
	call tdoma2 (xmin,ymin, xmax,ymax)

c	build 2 axes
	call taxyln (xaxid, 10.,10.,0., 20.0,0.0)
	call tayxln (yaxid, 10.,10.,0., 20.0,0.0)

c	build circle 
	call tccr2 (circid, xc,yc, radius)

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

c	define a centered 2D view 
	call tv2cen (wkid,viewid,0.5,0.5,zoom,viewpt)
	

c	display scene on workstation
	call ppost (wkid,scenid,1.0)
	call prst (wkid,PALWAY)

c	close workstation and PHIGURE 
	call tclwk (wkid)
	call tclph 
	end

This program is identical to n° 1 with display on 2 axes. Note that, as the graduated axes are outside the domain, the zoom must be reduced slightly to display them on the workstation.


Previous Next Up Title Contents Index Functions Index Top Library