Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: function pixel_drawScribblePixel
gontiki
Newbie
Posts: 24
Permalink
gontiki
Post function pixel_drawScribblePixel
on: February 10, 2013, 21:57
Quote

Hi Sandy,

I am playing with my Nodbox Python server simulator (NPss 😉 ) in order to understand the Polargraph. In the end that could be tool to check the command files before sending them to the controller.

While looking into the "pixel_drawScribblePixel" function from the polarshield, I see that the variable "inc" is set to 0. At last in my simulator I get much nicer (i.e. more contrast) drawings with a value, say inc = 0.2.

Is there a reason why you have it at "0"?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: function pixel_drawScribblePixel
on: February 11, 2013, 11:08
Quote

Yes, but it's a secret and I can only tell you if you let me know some more about your NPss!

sn

gontiki
Newbie
Posts: 24
Permalink
gontiki
Post Re: function pixel_drawScribblePixel
on: February 11, 2013, 20:54
Quote

Oh, sure 😉 , I have it on my website (at the bottom of the page):

http://gontarczyk.org/gs/polargraph/polargraph-commands/

It is not an absolute exact simulation since in Python I work with Cartesian coordinates, while the server works with string lengths. But for testing and understand it does a good job for me, specially that Python is much more compact then C or Java.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: function pixel_drawScribblePixel
on: February 11, 2013, 22:07
Quote

Ha it worked! I tricked you into revealing your secrets! Well, the reason for the inc being 0 is that I intended it to be settable as part of the scribble pixel command, but never got around to doing it. I think my first bunch of practices revealed that values higher than 0.0 were better too - there's overlap at the edges of the pixel that makes for a much more homogenous drawing. Though I didn't notice any improvement in contrast, in fact if anything it defocussed the image.

I like the look of your program very much - very cool. I've always held off from writing much visualisation stuff because I didn't want to have to maintain the pixel drawing algorithms in two places and two languages. And I thought it might end up being hard to model some of the foibles of the algorithms - the shape of the acceleration lines in particular - and that could end up leading down the path of attempting to eliminate the hard-to-model behaviour for the wrong reason. Those bits are the "character" of the machine. Otherwise it's just a plotter. I also liked the idea that I needed to place my faith in the machine and accept what it served. However there's room for pragmatism.

I wonder if a "dry run" mode might be a rudimentary way of doing it using the existing code - so the machine would accept commands but instead of actually moving the motors, would stream back (or save) a list of coordinates that would be used to preview. Hum!

sn

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: function pixel_drawScribblePixel
on: February 11, 2013, 22:36
Quote

Oh the line from the preceding method that has

pixel_drawScribblePixel(originA, originB, size*1.1, density);

in it is the other place that makes pixels overlap. That's the one I played with mostly. The "inc" setting makes the pixels grow larger with each point that get's drawn.

sn

gontiki
Newbie
Posts: 24
Permalink
gontiki
Post Re: function pixel_drawScribblePixel
on: February 12, 2013, 00:51
Quote

No trick needed, this tiny script was there since a few days, just I was not sure if it's worth to mention it. But since I constantly build up on other works, I make of course my work public as well.

I agree, nothing beats your machine and specially it does not make sense to rebuild it in software, better use that time for producing graphics. This is why I call my script an "approximation", neither the scribbles nor the square waves it produces are identical with what your machine actually draws.

I rather see it as a tool to quickly check a command file before spending hours of plotting. I had the case with my first scribble plot that I indeed got really nice scribbles - just the underlying image was nearly invisible. So, my faith in the machine, paired with my non-existing experience only produced a plot which I may use for a nice gift-wrap. 😉

Also while playing with SVG (and sorry, using your machine only as a plotter), this script may be useful. Beside the build-in drawing functions of your machine I am interested in a) generative art and b) for the book projects I do with my wife any kind of calligraphy. For those project I need narrow (20 cm) but long (2m) plots. I expect that the longer the text gets the more unsharp it becomes, and this is exactly how our memory works.

So, next step for me is to dig into the ROVING-tab (which I didn't try yet) and study the C30 and C40 commands. 😉

BTW (and this is definitely off-topic), there is an other artist Chris Eckert which builds beautiful machines (if I am right partly also based on Aruino), and some are writing machines as well: http://www.chriseckert.com/. Very inspiring.

g.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.042 seconds.