We always use function Graphics and Graphics3D to represent items in the Wolfram Language.

Use RegularPolygon to draw a triangle.


Make a red octagon.

Graphics[Style[RegularPolygon[8], Red]]

Make a list whose elements are disks with hues varying from 0 to 1 in steps of 0.1.

Table[Graphics[Style[Disk[ ], Hue[n]]], {n, 0, 1, 0.1}]

Make a list giving the regular polygons with 5 through 10 sides, with each polygon being colored pink.

Table[Graphics[Style[RegularPolygon[n], Pink]],{n,5,10}]

Make a graphic of a purple cylinder.

Graphics3D[Style[Cylinder[], Purple]]

Make a list of polygons with 8, 7, 6, … , 3 sides, and colored with RandomColor, then show them all overlaid with the triangle on top (hint: apply Graphics to the list).

Table[Graphics[Style[RegularPolygon[n],RandomColor[]]], {n, 3, 8}]

Graphics[Reverse[Table[Style[RegularPolygon[n], RandomColor[]], {n, 3, 8}]]]

Categories: Math

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
A prohibited operation
Would love your thoughts, please comment.x