How to resolve the algorithm Pentagram step by step in the Racket programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Pentagram step by step in the Racket programming language
Table of Contents
Problem Statement
A pentagram is a star polygon, consisting of a central pentagon of which each side forms the base of an isosceles triangle. The vertex of each triangle, a point of the star, is 36 degrees.
Draw (or print) a regular pentagram, in any orientation. Use a different color (or token) for stroke and fill, and background. For the fill it should be assumed that all points inside the triangles and the pentagon are inside the pentagram.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Pentagram step by step in the Racket programming language
Source code in the racket programming language
#lang racket
(require 2htdp/image)
(overlay
(star-polygon 100 5 2 "outline" (make-pen "blue" 4 "solid" "round" "round"))
(star-polygon 100 5 2 "solid" "cyan"))
You may also check:How to resolve the algorithm ISBN13 check digit step by step in the Go programming language
You may also check:How to resolve the algorithm Statistics/Basic step by step in the RPL programming language
You may also check:How to resolve the algorithm Even or odd step by step in the AWK programming language
You may also check:How to resolve the algorithm Fermat numbers step by step in the Julia programming language
You may also check:How to resolve the algorithm Loops/Increment loop index within loop body step by step in the Delphi programming language