Skip to content

Conversation

@two-ticks
Copy link
Contributor

@limzykenneth
Copy link
Member

@two-ticks Looks good so far. Are you thinking about adding KaTeX equation formatting at this point or is this ready to merged?

@two-ticks
Copy link
Contributor Author

It is producing same result as processing.org so for now we can consider it to be ready for merge.

@two-ticks
Copy link
Contributor Author

We can open separate issue for KaTeX equation formatting because other examples such as Sine Cosine also require KaTeX equation formatting.


function draw() {
loadPixels();
var n = (mouseX * 10.0) / width;
Copy link
Member

Choose a reason for hiding this comment

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

can you update this to ES6 and use const or let for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes :

let n = (mouseX * 10.0) / width;
const w = 16.0; // 2D space width
const h = 16.0; // 2D space height
const dx = w / width; // Increment x this amount per pixel
const dy = h / height; // Increment y this amount per pixel
let x = -w / 2; // Start x at -1 * width / 2
let y;

let r;
let theta;
let val;

@two-ticks two-ticks requested a review from lmccart March 12, 2021 01:35
Copy link
Member

@lmccart lmccart left a comment

Choose a reason for hiding this comment

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

can you please update to ES6 in all three files? thanks!

@two-ticks two-ticks requested a review from lmccart March 12, 2021 03:27
@two-ticks
Copy link
Contributor Author

updated es6 in all three files

@lmccart
Copy link
Member

lmccart commented Mar 12, 2021

looks great, thanks!

@lmccart lmccart merged commit 3176b92 into processing:main Mar 12, 2021
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.

Graphing 2D Equations example missing from p5js.org/examples

3 participants