Drawing a star with n points
Show older comments
Hi guys I have this question to do but I have no clue for any of it.
First write a function file star.m with first line function turtle=star(turtle,npoints,R,r) which uses turtle to draw a star centred at the turtle’s current location. Inputs: • turtle: an initialized turtle to draw the star with; • npoints: the number of points the star; • R: distance from the centre of the star to the points; • r: distance from the centre to the inward corners between the points. Output turtle: turtle used for drawing in its new state. One point of the star should point in the initial direction of the turtle.
Thanks help would be appreciated.
4 Comments
Ken Atwell
on 16 Oct 2015
Edited: Ken Atwell
on 16 Oct 2015
Is this a homework problem? It seems like you need a "turtle" object, did your professor provide you one?
James Connor
on 16 Oct 2015
Maria Koneva
on 11 Jun 2020
Sounds like python
Adam Danz
on 25 Mar 2021
- number of rays
- center point
- inner and outer diameters
- orientation

Accepted Answer
More Answers (0)
Categories
Find more on Polymers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!