Remix challenges

If you want to make an additional remix of this project, originally made by cornelios207, here are three challenges.

Easy challenge (click to open)

The easy challenge: replace the 'gravity' watcher by a new variable (you can name the new variable 'Moon_Earth') watcher, so that its minimum value is 1 (as if it would be on the Moon) and its maximum value is 2 (as if on the Earth).

If the 'Moon_Earth' variable is set to 1 (by user dragging its watcher to 1), then set the 'gravity' variable to 3 in the code; if it is 2 (by user dragging its watcher to 2), then set the 'gravity' variable to 25.

===

Medium challenge (click to open)

The medium challenge: change the project so that the 'anchor' sprite will not attract the default clone, but a clone with specific index, instead.

===

Hard challenge (click to open)

EDIT: I'm sorry @spaceelephant that you went straight to the hard one. I decided to retract it because the medium one needs to be solved first.

EDIT: The hard challenge is an extension of the medium one.

===

Decided to just do the easy challenge - because the other ones make me lost eheh.
Here, hope I did it right.

Thank you for sharing your remix. You did a wonderful job.

@sqoosh would you be so kind to edit your post so that the iframe's height will be matching the project's stage height (which is not the default value, but a bit higher, 560)? The reason I'm asking it is because now the lost proportions are causing the variable watchers to be overcrowded in the iframe.

Another tip: Too much space is taken by title and author's name (and I like long descriptive titles), so you can not click on green flag, pause and stop buttons or on 'eye' icon, as they get overwritten - so, to prevent this, the '&showAuthor=true' portion needs to be deleted (as shown in the details at the bottom of this post).

The iframe in your post should look like this (after you will make the edits).

See how the variable watchers aren't as crammed as before and it is possible now to click on both small, yellow pause and red stop, buttons (the small green flag icon being overwritten isn't problem since you can click on the big encircled green flag, instead), as well as on 'eye' icon.

In the details below the parts that need to be edited have been bolded.

click for details

.. iframe
allowfullscreen
src=".../embed?project= cornelios_inverse_k_remix%20%5Beasy%20remix%20challenge%5D

&user=sqoosh &showTitle=true &showAuthor=true &editButton=true &pauseButton=true"
width="480" height="560" frameBorder=0>
...

Thank you!

Done.

Great!

The vertex that is being pulled towards the anchor is not the same one all the time; 'k' variable is index of the vertex clone being pulled towards the anchor; notice that 'k' is changing during the project is being run.

But the question, which still doesn't have a solution, is the following one: how to keep the distances between vertices equal even when the 'k'-th clone of vertex is being pulled towards the anchor?

I think I finished the hard challenge. It was a bit confusing though.

It looks like the webpage at https://snap.berkeley.edu/embed?project=cornelios_inverse_k_remix_hard&user=spaceelephant&showTitle=true&showAuthor=true&editButton=true&pauseButton=true might be having issues, or it may have moved permanently to a new web add...

Edit: Other embeds aren't working for me either.

Thank you for trying, @spaceelephant . The hard challenge is, however, an extension of the medium one; I'm so sorry I haven't clearly stated this in the description of the hard one (I have retracted it until we solve the medium one).

In other words, each segment should be equally long. But it isn't and I don't know why. See the screenshot.
issue