Changing Transformations

First off, let me say that I have poached this activity from Daniel Wekselgreene’s Parent Functions: Translation & Transformation. Its great, but I can’t take any credit for it.

At the moment, if you work through slides 2 and 3, whenever you change to a new problem, it’s exactly the same translation for each slide. In other words, when the numbers reset, they reset in exactly the same way. So the kids end up repeating exactly the same thing on each slide.

Can I make it so that the transformations in each slide will just be totally random?

Many thanks
Ingrid

If on Slide 3, you change the s_eed value (line 80 of graphSliders) from 1 to any other value, it should generate an entirely different set of random numbers.

Awesome!!!

Thank you!!!

If you set the s_eed in the CL using the random number generator instead of manually changing it in the graph, each student will have a different translation.

Hi Daniel
I’ve looked at some tutorials, but not sure how to do that on this. Can you help?
(Not trying to get you to do my work for me, just honestly am stuck where to start)

Many thanks
Ingrid

r=randomGenerator
number(`s_{eed}`): r.float(0,1)

float will select a random decimal (here between 0 and 1), but you could use int( ) to select an integer range. Basically, if a random number is set inside the graph, it’s always that number, so each student receives the same graph, or graph values. However, if you use the random generator in the CL, each student is given a different random value. That’s often why coders will use a “seed” value to randomize within their graphs.

I was hoping to borrow your version, but it looks like you marked it private. Would you mind sharing?

Hi Sarah

I’ve changed it to public, but I’ve been messing around with it and there’s not a lot there at the moment, but have at it, no worries.

Cheers
Ingrid