Skip to content

Conversation

@hpols
Copy link

@hpols hpols commented Aug 15, 2018

To ensure the CantorGasket works with higher and lower recursions, use the variable and deduct one in the for-loop.

To ensure the CantorGasket works with higher and lower recursions, use the variable and deduct one in the for-loop.
Copy link

@Kvaibhav01 Kvaibhav01 left a comment

Choose a reason for hiding this comment

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

Please tell me how this RECURSIONS works here?

@hpols
Copy link
Author

hpols commented Aug 15, 2018

RECURSION is the global variable we defined holding the number of recursions. Following the suggestion this was 5.

The commented out for-loop, which offers a tighter code, uses 4 (i.e. recursion - 1). I would thus suggest to actually do that calculation there instead of hard coding the result in. Like this, if for any reason the recursion is changed to a higher or lower number this will automatically adapt maintaining the effect we want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants