Tuesday, 15 July 2014

Processing.js -- Programatically creating arc shapes (perhaps using SVG?) -



Processing.js -- Programatically creating arc shapes (perhaps using SVG?) -

i'm processing programmer started fiddling processing.js. personal exercise, i've been trying port few features past processing project on processing.js... , i'm stumbling on custom shape creation.

in previous project had custom shape class created arc shapes such ones shown in this figure (with configurable inner/outer radius, , start/end angles). had create scratch because arc() function in processing doesn't allow much control. current goal recreate such arc shapes dynamically on processing.js.

on processing.js reference, says not possible create new shape, svg files can loaded instead. of course, not feasible create internal svg file every time want create new shape, generating string representing svg code parsed option.

so first question be: is possible create custom shapes in processing.js in other way svg files? if not, sec question be: is there way can "input" xml string pshape class can parsed svg file would?

one major assumption i'm making creating shape more efficient drawing vertices every cycle beginshape()/endshape()... might not true, couldn't find supporting material on either. ultimately, 3rd question be: doesn't create more sense iterate on vertices?

i'm assuming processing.js doesn't have flexible arc functionality available (simply because processing didn't). i'd happy instructed otherwise, solve problem now... i'd still larn more custom shape alternatives in processing.js, more general understanding.

many thanks!

svg processing processing.js

No comments:

Post a Comment