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, HightHeight, Color) :->
send(P, send_super, initialise),
send(P, append, Pos),
H is ceiling(sqrt(HightHeight * 48)),
get(Pos, x, X),
get(Pos, y, Y),
Line 2,416:
:- pce_begin_class(vpara, path, "drawing of a vertical parallelogram").
 
initialise(P, Pos, HightHeight, Depth, Color) :->
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 + HightHeight,
send(P, append, point(X1, Y2)),
Y3 is Y2 + H,
Anonymous user