Anonymous user
Draw a cuboid: Difference between revisions
→{{header|Prolog}}: Fixed typo in variable names (Hight → Height)
(→{{header|Phix}}: added ascii) |
(→{{header|Prolog}}: Fixed typo in variable names (Hight → Height)) |
||
Line 2,396:
:- pce_begin_class(hpara, path, "drawing of a horizontal parallelogram").
initialise(P, Pos, Width,
send(P, send_super, initialise),
send(P, append, Pos),
H is ceiling(sqrt(
get(Pos, x, X),
get(Pos, y, Y),
Line 2,416:
:- pce_begin_class(vpara, path, "drawing of a vertical parallelogram").
initialise(P, Pos,
send(P, send_super, initialise),
send(P, append, Pos),
Line 2,425:
Y1 is Y - H,
send(P, append, point(X1, Y1)),
Y2 is Y1 +
send(P, append, point(X1, Y2)),
Y3 is Y2 + H,
|