Skip to content

add example drawing a dragon curve#29

Merged
sunjay merged 2 commits intosunjay:masterfrom
exoticorn:dragon-curve
Nov 30, 2017
Merged

add example drawing a dragon curve#29
sunjay merged 2 commits intosunjay:masterfrom
exoticorn:dragon-curve

Conversation

@exoticorn
Copy link
Copy Markdown
Contributor

Every turtle library/language needs an example of a dragon curve. ;)

Comment thread examples/dragon.rs Outdated
turtle.hide();
}

fn dragon(turtle: &mut Turtle, turn: f64, depth: usize, c0: f64, c1: f64) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some documentation to this function regarding the meaning of each of these parameters? If you can't also give them more detailed names, it would be really helpful to someone playing with this example in the future if you could write down some information about what each variable and parameter means and what it does to the output.

@sunjay
Copy link
Copy Markdown
Owner

sunjay commented Nov 30, 2017

Wow! Thank you for the PR! This is an incredibly cool example!

screenshot from 2017-11-29 22-47-50

I've left a few small comments regarding some documentation. Once you get a chance to do that, I am ready to merge this. Thank you so much!

Regarding the Travis CI build, it is intentionally failing right now on MacOS because #27 has not been fixed yet. Since all the Linux builds pass, you are good to go!

@sunjay sunjay self-assigned this Nov 30, 2017
@sunjay sunjay added this to the 1.0.0 - MVP milestone Nov 30, 2017
@exoticorn
Copy link
Copy Markdown
Contributor Author

I wrote a little more than I intended, but hopefully this makes it very clear what the code is doing. (folding paper) ;)

I also mirrored the curve to better match the description.

Copy link
Copy Markdown
Owner

@sunjay sunjay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love your ascii diagrams and very clear explanation of the example! This is awesome!

@sunjay sunjay merged commit 5b6b147 into sunjay:master Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants