Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1] 2
Author Topic: Line drawing from point cloud
AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Line drawing from point cloud
on: May 10, 2013, 15:30
Quote

Heya folks,

Tried out a new drawing technique today using Diana Lange's superduper processing sketch: http://www.openprocessing.org/sketch/84552

It makes points from an image and draws lines directly from point to point, I guess it's sort of the same as the TSP technique. Anyway, I really like the rough sketch like output.

Maybe this or something like it could be integrated into the controller at one stage Sandy? It did require some tweaking to get it to pick up the right shades and what not. (and to output a pdf, that's about as much programming I'm able to do 😕 )

Also, sorry for bombarding this forum with my constant posts. I spend too much time with the polargraph and on this forum, but it's such a fascinating machine. I just love hearing it wirring and bzzzt'ing in the background and constantly producing art for it's master, yay! 😀
Image

kongorilla
Pro
Posts: 384
Permalink
kongorilla
Post Re: Line drawing from point cloud
on: May 11, 2013, 00:24
Quote

Keep bombarding us. It's good stuff!

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: May 11, 2013, 09:20
Quote

I really love that style Andy, I've seen Diana Lange's stuff on openprocessing before and thought the exact same thing. It's very beautiful, apparently expressive, fragile stuff, her portraits are wonderful.

I'm not planning on bringing something like that into the controller at this time, but it isn't such a leap. Once there's a established workflow that passes the loaded bitmap through a particular processor, and produces a vector drawing out of it, then it shouldn't, in principle be too tricky. I've already converted the "webcam" tab to be a "trace" tab, and it does do that now.

Again, I'm a bit reluctant to put something with so many parameters into the controller. It might be better served by having a hot-reload option for the svg, so it would spot if a file got changed and reload it. So you would still need to hack the sketch to output svg, but you've found out that's not too hard in most cases, and from my point of view, preferable to embedding a whole lot of extra stuff in the app. And it could be pretty smooth.

Where I would be very happy to see something like this integrated is in the firmware. This is a bias I have in all things polargraph, I would always rather see the machine having some innate behaviour, rather than being used as a plotter, it's just more interesting, and (lets be honest), there are better solutions out there if you want a plotter firmware.

The big problem is that most of these kinds of algorithms work by producing a giant array of points, and then treating them en masse, and the arduino just doesn't have the memory for that kind of work.

And don't worry about wearing the forum out - just keep on coming up with beautiful drawings and all is forgiven 🙂 Seriously, it's great, and gratifying, and very encouraging to see folk being enthusiastic and getting cool stuff done, thanks!

sn

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: May 11, 2013, 14:04
Quote

Good to know I'm not being a pain in the butt! Never know. Thanks gents.

Yeah I hear what you're saying, I keep getting a out of memory message from processing when running that sketch for longer than 30 or so seconds, it's quite a memory hog. I don't mind extracting a svg from processing/illustrator or using the already excellent features of the controller, but it would be like you said, cool if the machine had a way of it's own to interpret the image and produce an output that was unexpected.

That being said, I'm very very happy with the way the polargraph is now!

RedStar
Newbie
Posts: 11
Permalink
Post Re: Line drawing from point cloud
on: May 24, 2013, 13:09
Quote

Hey AndyB
What are the chances you could share how you got a vector out of that superduper processing sketch?
I've been looking for a near drawing style for some drawings in my head but sadly my work with a soldering iron is a million times better than me and code 🙁
This sketch makes just the drawing style I had in my head but alas it is beond me to get it into Mr.Polargraph...

Thanks greatly 😀

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: May 24, 2013, 13:56
Quote

I noticed last time I was there that openprocessing has a built-in mechanism for managing tweaked versions of sketches. It calls them tweaks, but I guess they are just like forks in git. It would be very cool if any "fixes" that enable processing sketches to output to vector files could be added to openprocessing as a fork.

I suspect the sandboxing of the java applets on openprocessing will prevent files being generated actually on the site, but if the code was there then at least it could be downloaded.

The alternative is to keep a separate git repository of working "visualisation" apps. Not sure if there's a clever way to manage that since most people who make sketches won't necessarily have them in a git repo already.

sn

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: November 26, 2013, 15:10
Quote

PAH! Sorry, I haven't been very active here for a while and doing much polargraphing at all due to moving to a new flat, uni etc.

However I'm now up and running again and have found a nice spot for my machine, happy to report it's still working perfectly after moving (+ motors having fallen out of the hinges a couple of times and my puppy doing his best to chew on all the wires!)

So, sorry RedStar, didn't see your post until now. I've made a little zip package of a couple of polargraph friendly processing sketches, including Diana Lange's. The correct way to do it like Sandy said would be to upload a tweak to openprocessing, but I've tweaked and messed around in them so much, and probably not done it "the correct" way regarding commenting etc. that seasonal programmers expect.
So I've just uploaded it here: http://www.filedropper.com/sketches

Most of the sketches use the "p" keystroke to output a Pdf in the sketch folder, but there's also one using the left mouse button. Images usually go into the data folder and needs to be renamed "image.jpg". Lange's sketch is a bit tricky when it comes to picking up image threshold values, so you'll probably need to tweak around in the code or at least with the contrast values of your image to get a nice output.
Also keep in mind you might need some add-on libraries for running some of the sketches, but processing will tell you which one's it needs.

I usually import the pdf outputs into adobe illustrator and then save them as a .svg for polargraph usage.

Happy to come back and see so much good stuff being made on your machine Sandy. Kongorilla is surely the master of polargraphing!

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: November 26, 2013, 15:31
Quote

Kongorilla is indeed doing it like a boss, and is showing me up terribly. HOWEVER, in my defence, I've been committing to a new repo lately that speaks on this subject a little - https://github.com/euphy/polargraphlib is a Polargraph library for Processing that will be easily added to any sketch that deals with vector output, and will let you pipe that output to a queue, or to a connected machine.

It's only half done at this time - the serial connection is giving me gyp, and I can't seem to compile it as a library through eclipse any more (jar version hell I think), but it'll end up visible and working soon, and then I'll make a proper announcement and ask you all to start kicking it to pieces.

Good to have you back 🙂
sn

kongorilla
Pro
Posts: 384
Permalink
kongorilla
Post Re: Line drawing from point cloud
on: November 26, 2013, 16:28
Quote

Aw, shucks. *blushing*

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: November 27, 2013, 10:44
Quote

Weheeey, that's fantastic Sandy! That opens up to so many possibilities. And what a excellent way to learn processing as well, programming little drawing machines for the polargraph.

sjpatel199-
2
Newbie
Posts: 5
Permalink
Post Re: Line drawing from point cloud
on: December 18, 2013, 21:44
Quote

Hey AndyB, is it possible for you to get that link up again for the zip file you made for the processing sketches? The link you posted a while back isn't working anymore. Thank you.

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: December 30, 2013, 14:34
Quote

Hey, sorry I was away for christmas!

I've uploaded the sketches again: http://www.filedropper.com/sketches
Don't know for how long they will stay..I could mail them to you, but this forum doesn't have private messages. Just keep reminding me if it's unavailable again, I'll try to respond more swiftly.
Both sketches use "p" to output .pdf.

PS!
It's not very hard to add pdf output to most processing sketches, just copy paste the applicable code from here: http://processing.org/reference/libraries/pdf/

Good luck!

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: December 30, 2013, 19:49
Quote

Hey if I add you to the google code project, could you upload it to the downloads area from there?

sn

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: December 31, 2013, 14:59
Quote

Hey Sandy,

Sure go ahead. Do you need my mail or anything for that?

Merry christmas and happy new year by the way!

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: December 31, 2013, 16:43
Quote

Thanks, you too 🙂

Have just added you as a committer to the project - I think that means you should be able to create / remove downloads, but let me know if you have any problems.

https://code.google.com/p/polargraph/

sn

AndyB
Beginner
Posts: 28
Permalink
AndyB
Post Re: Line drawing from point cloud
on: January 6, 2014, 16:32
Quote

Ok, I've uploaded the sketches to the google code project now. My first time using google code, so please let me know if I've done anything wrong. 🙂

Also, sorry, I'm really slow these days..my brain is still on Christmas holiday unfortunately!

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: January 7, 2014, 09:18
Quote

Och no hurry at all Andy, it all looks good to me. It's really just so you don't have to maintain a file repository yourself. For other folks, the couple of sketches are at https://code.google.com/p/polargraph/downloads/detail?name=Sketches.zip

I've just remembered that Google code have recently deprecated the downloads section of their project, and will be blocking new uploads in February (afaicr). I think they (google) want us to use google drive stuff instead, so things might change in the future. If that isn't the most obvious statement that anyone has ever made.

cheers!
sn

motorimicr-
o
Newbie
Posts: 19
Permalink
Post Re: Line drawing from point cloud
on: January 21, 2020, 08:34
Quote

I'm trying to run diana superdump in processing but it gives me the following error ... do you have any suggestions?

Image

sandy
Administrator
Posts: 1414
Permalink
sandy
Post Re: Line drawing from point cloud
on: January 21, 2020, 20:53
Quote

This is because the KeyEvent hasn't been imported so Processing doesn't know what it refers to. You could try adding:

import java.awt.event.KeyEvent;
import java.util.Calendar;

to the beginning of your file. The next complaint will be one about not finding the file that's referenced (called "delorien.jpg") on the current first line of the file.

Diana Lange is awesome, amazing and inspirational stuff.

Good luck!

sn

motorimicr-
o
Newbie
Posts: 19
Permalink
Post Re: Line drawing from point cloud
on: January 25, 2020, 19:09
Quote

sorry I'm late but I'm doing a lot (even a lot of problems) with the polargraph and a cnc ... it works!!! ... you're a big
thank you very much

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