Hacker News new | past | comments | ask | show | jobs | submit login

How is this different than p5.js?



"When someone interacts with the graphics, for example by trying to drag an element to a new position, g9 optimizes over the space of possible values for your data to find a set of values that comes closest to creating the change."

This clearly isn't trying to be Processing. Obviously it's not revolutionary in terms of being productive, but it's a super cool concept and seems unique to me! The dragon example is particularly telling. You can grab any node and it tries to fit the fractal to wherever you move it.


I'm not familiar with p5. Can you pick an arbitrary rendered point of a p5 picture, and manipulate it?


Yes, it has full interactivity support: https://p5js.org/learn/interactivity.html

P5 has an imperative/immediate mode style of graphics API so you have to code the result of your interactivity (moving a point, etc.) yourself. Something like three.js, which has a full scene graph for rendering and interactivity, might be a better choice if you want a lot of interactivity out of the box.

I'm kinda scratching my head at g9 as it seems to be a mish mash of scene graph that's implicitly generated and imperative rendering APIs. It's not exactly clear to me why you'd want this mix except for very specific scenarios the author created support for with their implicit scene graph generation for interactivity.

In my mind you either want something that's like three.js with a full scene graph style of rendering and interactivity, or a p5 style imperative API for both. This seems to be some in-between thing to scratch some itches.


Have you tried dragging one of points?


Yes, I understand what is happening here with interactivity. Like I said I don't follow why I want some implicit generation of an interactivity scene graph (i.e. what points are connected or move relative to other points) when I can just be explicit about the scene graph interactivity with other similar libraries.


Because it's a fast way to get that interactivity, rather than having to explicitly code it yourself.

A good example are modern math videos on youtube, like this one (not saying that they're using G9.js in particular): https://www.youtube.com/watch?v=spUNpyF58BY

It's 20 minutes of changing graphics. You could code all of that with P5, and it would be an excruciatingly long process. G9.js would get you there in a fraction of the time.


Dumb question -- I know what d3 stands for. What are the 5 p's in p5 and the 9 g's in g9?


I was curious too, took a little bit of digging :)

"the original domain of [P]rocessing was proce55ing.net, so people used to sometimes refer to processing as proce55ing or P5 or p5 for short. they still do sometimes. p5.js is a reference to that."

from https://github.com/processing/p5.js/issues/2443




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: