Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I needed some help with printing Fractal tree sequences. I want to make a HTML page that would have a: Choose File Option. For example

I needed some help with printing Fractal tree sequences.

I want to make a HTML page that would have a: "Choose File" Option. For example something like this:

image text in transcribed

The uploaded file will be of .txt format which in turn will contain instruction like:

len: 1 iter: 6 rot: 60.0 60.0 60.0 rep: R,F rep: L,F start: R L: R+L+R R: L-R-L

where len represents length of each segment to draw, iter represents the number of iterations to apply, rot represents the X, Y, and Z rotations respectively, rep represents string that results after applying the production rules "iter" times. For each occurence of "R" in this string, it is replaced with the character "L". "L" may be ommitted, in which case all occurences of "R" are removed from the string. Rep can be included in 0 or more times. Start tells where to start the initial turtle string, and some number of production rules of the form: "L: R", where "L" is a single character representing the left-hand side of the rule, and "R" is a sequence of characters representing the replacement string for "L". I need to use this instructions in the JavaScript to convert this instructions into tree sequence.

I need to output the tree sequence on the screen or on the console. The tree sequence should look something like this:

image text in transcribed

The above image just shows an example of the output, not the correct output for the instructions provided.

Thanks for all the help.

Choose File No file chosen Something here Choose File No file chosen Something here

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

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

What makes Zipcar an attractive employer for which to work?

Answered: 1 week ago