unit Drowing; interface uses d3, Fig3D; Function DCirc3d(Fig:TFig; C: Point; R: Word; n:byte; plan: DirVec):byte; {C-center, R-radius, n-line numbers} implementation Function DCirc3d; var du:real; i: byte; d1, d2, d3: DirVec; p1: point; tab: array[byte]of fElements; begin Result:=1; d1:=plan; d2:=d1 mod 3 + 1; d3:=d2 mod 3 + 1; if Fig = nil then Result:=0 else with Fig^ do begin if fC=nil then begin new(fC); fC^:=zero; end; if m=0 then m:=round(r*r*pi); du:=2*pi/n; for i:=0 to n-1 do begin p1[d1]:=C[d1]+trunc(r*cos(i*du)); p1[d2]:=C[d2]+trunc(r*sin(i*du)); p1[d3]:=C[d3]; tab[i]:=AddP(p1); end; for i:=0 to n-1 do AddL(tab[i],tab[(i+1)mod n]); Init; end; end; end.