Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LOGO was a programming language (introduced in 1967) used to introduce elementary students to programming. It featured a triangular cursor, called a turtle, that students

image text in transcribed

LOGO was a programming language (introduced in 1967) used to introduce elementary students to programming. It featured a triangular cursor, called a "turtle, that students could move forward, turn, and toggle an option to create a line following the cursor or not. One thing students could do was draw shapes. We will be creating a similar function to generate shapes. Program Specifications: The function inputs will be the radius of the shape, R, and the number of sides, N. The function will not have any outputs that can be fed to the workspace, nor will it produce any statements or variables to the workspace, but it will produce a single plot. This plot will be an N-sided polygon. There will be no axes labels or titles for the plot. Name your function . For example, I would name my script Arif_T_ME3500_Activity4.m. (Matlab functions are always saved as .m-files, just like script files) Helpful Hints: An N-sided polygon has an internal angle of 0 = 360/N. The x- and y-vectors for the ith data point can be found to be (x = Rcos(Oi) { t where i is a value such that i = 1, 2, ... N+1. Remember, you will need to have N+1 data points so that the polygon is completely enclosed. Figure 1: a five-sided polygon (pentagon) LOGO was a programming language (introduced in 1967) used to introduce elementary students to programming. It featured a triangular cursor, called a "turtle, that students could move forward, turn, and toggle an option to create a line following the cursor or not. One thing students could do was draw shapes. We will be creating a similar function to generate shapes. Program Specifications: The function inputs will be the radius of the shape, R, and the number of sides, N. The function will not have any outputs that can be fed to the workspace, nor will it produce any statements or variables to the workspace, but it will produce a single plot. This plot will be an N-sided polygon. There will be no axes labels or titles for the plot. Name your function . For example, I would name my script Arif_T_ME3500_Activity4.m. (Matlab functions are always saved as .m-files, just like script files) Helpful Hints: An N-sided polygon has an internal angle of 0 = 360/N. The x- and y-vectors for the ith data point can be found to be (x = Rcos(Oi) { t where i is a value such that i = 1, 2, ... N+1. Remember, you will need to have N+1 data points so that the polygon is completely enclosed. Figure 1: a five-sided polygon (pentagon)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions