Hi all. First time here. Have a question and haven't been able to find an answer yet in a few hours of searching, so here I am.
I am running MS Excel 2003.
A user inputs a string of letters/symbols all meaning different things. These would typically for my case be L, R, +, -, F. These items correspond to certain behaviors. Essentially I'm working on a L-System solver for those of you who are well versed in math. For those of you who aren't, I'll explain a bit.
An L-system starts with a string, for example:
LFL+F+LFL
and then has one or more generators:
L:-RF+LFL+FR-
R:+LF-RFR-FL+
then at each iteration of the system, every L and R in the previous iteration gets replaced with that string. The +/- are incremental angles.
I need to be able to take each iteration and convert it into a series of rows with one character in each row. I need it to do this automatically, and automatically adjust to the proper length of rows (these strings can get thousands of characters long because each iteration of the system converts the Ls and Rs into longer strings containing more of all of those letters.) Once each of those rows are constructed, I need it to run some mathematical operations on each of these rows automatically.
For example, for each + or -, the value in an angle column should change by an increment given elsewhere in the sheet. For each F, the x and y coordinates should change from the previous iteration based on the angle (just a basic d+dcos(ang) or d+dsin(ang) where d is a distance multiplied by a scaling factor).
I have no experience with Macros or any type of scripting, so if I can keep this in an Excel formula, that would be ideal. I know a minimal amount of C++ and Python, but that's the extent of my programming knowledge.
Is this doable, and if so, how?
Thank you for the help.
I am running MS Excel 2003.
A user inputs a string of letters/symbols all meaning different things. These would typically for my case be L, R, +, -, F. These items correspond to certain behaviors. Essentially I'm working on a L-System solver for those of you who are well versed in math. For those of you who aren't, I'll explain a bit.
An L-system starts with a string, for example:
LFL+F+LFL
and then has one or more generators:
L:-RF+LFL+FR-
R:+LF-RFR-FL+
then at each iteration of the system, every L and R in the previous iteration gets replaced with that string. The +/- are incremental angles.
I need to be able to take each iteration and convert it into a series of rows with one character in each row. I need it to do this automatically, and automatically adjust to the proper length of rows (these strings can get thousands of characters long because each iteration of the system converts the Ls and Rs into longer strings containing more of all of those letters.) Once each of those rows are constructed, I need it to run some mathematical operations on each of these rows automatically.
For example, for each + or -, the value in an angle column should change by an increment given elsewhere in the sheet. For each F, the x and y coordinates should change from the previous iteration based on the angle (just a basic d+dcos(ang) or d+dsin(ang) where d is a distance multiplied by a scaling factor).
I have no experience with Macros or any type of scripting, so if I can keep this in an Excel formula, that would be ideal. I know a minimal amount of C++ and Python, but that's the extent of my programming knowledge.
Is this doable, and if so, how?
Thank you for the help.