: = (x2-x1)/(y2-y1) else xs: = 0;
if y1> y2 then
swap (y1, y2); swap (x1, x2);;
for i: = 0 to abs (y2-y1) do
Drawp (x1 + round (i * xs), y1 + i, color);;; init (nums, radius: integer);, y, z: integer;: = 160; p>
{--- cilindr --------------------------------} i: = 0 to 19 do
begin
points [i]. x: = -50;
points [i]. y: = radius * cos (pi * i/nums);
points [i]. z: = radius * sin (pi * i/nums);
points [i +20]. x: = 50;
points [i +20]. y: = radius * cos (pi * i/nums);
points [i +20]. z: = radius * sin (pi * i/nums);
end;
{piramida} i: = 0 to 6 points [150]. y: = 0; points [150]. z: = 0;
{segment}: = 0; z: = 0 to 19 to 4 doz: = 0 to 19 nums) * sin (pi * (y)/nums) * 40;;
{----------------------------------------- ----------------------}: = 320;
{cilindr} i: = 0 to 19 do
begin
lines [i]. point1: = i;
lines [i]. point2: = i +1;
lines [20 + i]. point1: = 20 + i;
lines [20 + i]. point2: = 20 + i +1;
lines [40 + i]. point1: = i;
lines [40 + i]. point2: = 20 + i;
{pyramid}
{lines [279]. point1: = 149; lines [279]. point2: = 143; [300]. point1: = 159; lines [300]. point2: = 0;} i : = 0 to 6 do [260 + i]. point1: = 143 + i; lines [260 + i]. point2: = 144 + i; [280 + i]. point1: = 143 + i; lines [280 + i]. point2: = 3 * i; [300 + i]. point1: = 143 + i; lines [300 + i]. point2: = 150;;
{segment} y: = 0 to 4 do [79 +20 * y]. point1: = 79 +20 * y; [79 +20 * y]. point2: = 60 +20 * y; z: = 0 to 18 do [60 +20 * y + z]. point1: = 40 +20 * y + z; [60 +20 * y + z]. point2: = 40 +20 * y + z +1;;; y: = 0 to 3 doz: = 0 to 19 do [159 +20 * y + z]. point1: = 40 +20 * y + z; [159 +20 * y + z]. point2 : = 40 +20 * y + z +20;; i: = 0 to 19 do [240 + i]. point1: = 120 + i; [240 + i]. point2: = 20 + i;;; draw ( xs, ys: integer);: integer; i: = 0 to numlines-1 do
begin
line (xs + round (rpoints [lines [i]. point1]. x),
ys + round (rpoints [lines [i]. point1]. y * yfx),
xs + round (rpoints [lines [i]. point2]. x),
ys + round (rpoints [lines [i]. point2]. y * yfx), 15);
end;;
1.