p5js-cheat-sheet icon indicating copy to clipboard operation
p5js-cheat-sheet copied to clipboard

Ideation for Intermidiate worksheet

Open bmoren opened this issue 5 years ago • 6 comments

Use this space to discuss or list things that you think should be included on the intermediate worksheet

bmoren avatar Feb 11 '19 20:02 bmoren

forloop & diagram radians / degrees chart events: mouseClicked(), mouseReleased(), keyPressed(), keyReleased() Image : loadImage() createImage() image() more math (+ conversion): floor() ceil() int() round() dist() constrain() more system variables: key, keyCode, keyIsPressed, mouseIsPressed, touches[] Tranform: translate() rotate() scale() push() pop() array definition ~~creating a class~~

bmoren avatar Feb 11 '19 23:02 bmoren

maybe some DOM stuff?

.hide() createSlider()

bmoren avatar Nov 28 '19 01:11 bmoren

function definition

bmoren avatar Nov 28 '19 01:11 bmoren

I wonder if classes should be kicked down to "advanced" -- assuming the intermediate sheet is also a one-pager.

3D?

jeremydouglass avatar Nov 28 '19 23:11 jeremydouglass

I agree that the classes should be on the advanced,

3D is tricky since there is just so much of it that's different. One approach I was thinking about would be to have a totally separate 3D sheet. So as of this count – 4 possible sheets that would be printed front / back: beginner/intermediate & advanced/3D

any thoughts on that idea?

bmoren avatar Nov 29 '19 23:11 bmoren

Although not very intuitive, the functions sin() and cos() can be quite useful. It is difficult to summarize the possibilities in one or two lines, but maybe you can add at least the code that allows calculating the points around a center:

x = centerX + cos(angle) * radius;
y = centerY + sin(angle) * radius;

Alternatively, you could insert the code for conversions between polar and Cartesian coordinates:

x = cos(angle) * distance;
y = sin(angle) * distance;
distance = sqrt(x*x + y*y);  // or distance = dist(0, 0, x, y);
angle = atan2(y, x) ;

But things would probably start to get too complicated for an intermediate worksheet.

livinbits avatar Dec 19 '19 05:12 livinbits