Please send me he slts and dxf files for the laser cuttings
thanks
↧
Files
↧
Re: Files
Which ones?
↧
↧
Software
Which software do you use to turn the pictures into the cool patterns using dots gradients etc. which is the best software?
↧
Software
Which software do you use to turn the pictures into the cool patterns using dots gradients etc. which is the best software?
↧
Re: Drawbots from around the web
↧
↧
stripping down the code to bare minimum?
hello
hows it going
i have an idea and would like some help
im curently using the polargraph adfruit version code and its working fine.
this code:https://github.com/euphy/polargraph_server_a1
but id like to learn how to do it myself and was looking to try stripping down the code to the bare basic code needed.
so far the code
uses
sd card fucnitons
eeprom functions
pen up/down functions
and much more including gcode conversion.
but really thats to much to understand.just yet so im trying to create a simple sketch that allows me to just write something like this in loop to draw a square.
void loop(){
drawline(40,0 ) //i.e right 40
delay()
drawline(40.-40 ) //up 40
delay()
drawline( -40.-40)//left 40
delay()
drawline(-40,0)//down 40
}
is there someone that could help point me in the direction of which functions do the processing of kinematics.
i understand the theory of making a vplotter but still a bit over my head.
so far i have understood that i get lenght of thread moved per each step.
and if i know the distance from motor to motor i can then somehow create a x,y coordinates system and convert it to lenghts of thread to each motor and increment them as needed to create a line. but thats where i blow up hah.
if anyone could give me some advice it would be great
thanks
↧
Re: stripping down the code to bare minimum?
Hi plottingmad! Yes, the vast majority of the code in most drawbots is to handle the command protocol rather than the actual drawing mechanics. That's the good news, because it really means that the actual drawing mechanics are pretty small and simple.
This code that formed the AS220 machine (https://web.archive.org/web/20090522073800/http://www.as220.org:80/labs/Code/drawbotErikSatie.txt) was the first I saw with source attached. Some of this still lives on inside Polargraph actually - spiral pixel uses these curve routines.
It's reasonably understandable on it's own, and it's about as stripped back as you'll get I think, there's no comms or commands as such.
In Polargraph, look in the util.ino file for the kinematics - there's a couple of functions in there:
float getMachineA(float cX, float cY) { float a = sqrt(sq(cX)+sq(cY)); return a; } float getMachineB(float cX, float cY) { float b = sqrt(sq((pageWidth)-cX)+sq(cY)); return b; }https://github.com/euphy/polargraph_server_a1/blob/master/util.ino#L165-L174 Given a cartesian x and y, these two above work out the length of cord A and cord B, ie the distance to the top left and right corners of the surface.
long getCartesianX(float aPos, float bPos) { long calcX = long((pow(pageWidth, 2) - pow(bPos, 2) + pow(aPos, 2)) / (pageWidth*2)); return calcX; } long getCartesianY(long cX, float aPos) { long calcY = long(sqrt(pow(aPos,2)-pow(cX,2))); return calcY; }https://github.com/euphy/polargraph_server_a1/blob/master/util.ino#L225-L242 The two above do it in the opposite way, converting the native machine coordinates (distance from the top corners) into cartesian coordinates. Note that you need to work out the cartesian X first, and use it as a parameter to work out the Y. sn
↧
Re: stripping down the code to bare minimum?
hey sandy thanks for the reply already i have understood allot more about whats going on..
and the code you gave me from AS220 Labs is very easy to read compared to a full blown vplotter with eeprom and such.
but as im not a naturally math man or programmer i still have more questions now.
in your code for the polargraph i notice you use the accel stepper lib can i ask why you did not make you own step function to drive them high low?
is the accel stepper lib good ?
im only asking as i have recently been trying to learn about interrupts and port manipulation via the amazing tut from iforce2d here :https://www.youtube.com/watch?v=fHAO7SW-SZI
which has really helped me learn more about motors.
i have taken out all the circle and drawing of the image to completely simplify it to just lines up,down,left or right
i have added some comments with an abundance of questions.sorry!
i was unable to get the original stepper.h to work as i have no clue what pins do step/dir on the adafruit v1 motor shield
i read here https://learn.adafruit.com/adafruit-motor-shield/faq
that these pins are used but with a serial-to-parallel latch which i think does not use step and dir ?
so i changed to the original AFmotor shield lib.
i have uploaded the code at paste bin with come more questions here.
https://pastebin.com/bJkdHDzE
i understand your getmachineA();
the same as the old drawbot code here
int a1= sqrt(pow(x1,2)+pow(y1,2));
int b1= sqrt(pow((w-x1),2)+pow(y1,2));
but if i get the distance to top right/left motors i.e length of steps i dont understand in which way i call up or down?is it minus for left and down and + for right and up?
thanks again man im going to be playing tonight.
↧
Re: stripping down the code to bare minimum?
Have a look at my version here: https://pastebin.com/kmM5nU7z I've not tested it but it compiles at least.
I've added some extra comments and cleaned up the variable names a bit to make them more clear hopefully.
You should use the AFMotor library if you've got an Adafruit style Motorshield with L293D H-bridge drivers. Those are not stepper drivers so there is no step+direction pins that you can simply drive high or low to make a step happen. You have to set the specific combination of the four stepper motor wires in a specific sequence in order to make a move.
Accelstepper supports non-blocking motor stepping and obviously acceleration. I think it's brilliant.
Regarding your last point, I'm not sure I understand. IF motorA is top-left, and motorB is top-right: Moving motorA plus will make the pen move down the drawing surface in a curve, swinging around motorB which isn't moving. Moving motorA minus will pull the pen up the page in the same arc.
Moving motorB plus will move the pen down in a curve, as it swings around motorA which isn't moving. Moving motorB minus will pull the pen up the page in the same arc.
All of the target positions are absolute, and positive though. It's not possible to move the pen to a negative position (it would be off the top of the machine!).
sn
↧
↧
Anyone else out there running Controller on a Mac? [Solved!]
I have the Controller software running OK on my Mac - but I cannot see a Serial Port to connect to. I've checked out the drivers and they look OK. I've tried different cables and different ports on my Mac too.
Then I noticed a whole stack of error messages are generated when I try to list the Serial Ports available (under the Setup tab). Copied below.
[Solved....... was an incorrect driver after all. CP210x USB to UART Bridge VCP Drivers were not properly installed]
Any thoughts welcome.
I might just see if I can dig out an old Windows machine and try on that tomorrow though.
The error log is as follows (for what it's worth)....
adding /dev/tty.Bluetooth-Incoming-Port
portNo: 2
Oct 16, 2018 7:23:28 PM controlP5.ControlBroadcaster printMethodError
SEVERE: An error occured while forwarding a Controller event, please check your code at button_mode_serialPortDialog
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
at controlP5.ControlBroadcaster.callTarget(Unknown Source)
at controlP5.ControlBroadcaster.broadcast(Unknown Source)
at controlP5.Controller.broadcast(Unknown Source)
at controlP5.Button.setValue(Unknown Source)
at controlP5.Button.activate(Unknown Source)
at controlP5.Button.mouseReleased(Unknown Source)
at controlP5.Controller.setMousePressed(Unknown Source)
at controlP5.ControllerGroup.setMousePressed(Unknown Source)
at controlP5.ControlWindow.mouseReleasedEvent(Unknown Source)
at controlP5.ControlWindow.mouseEvent(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1236)
at processing.core.PApplet.handleMethods(PApplet.java:1431)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2826)
at processing.core.PApplet.dequeueEvents(PApplet.java:2725)
at processing.core.PApplet.handleDraw(PApplet.java:2397)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:400)
at java.util.ArrayList.get(ArrayList.java:413)
at controlP5.ScrollableList.updateIndex(Unknown Source)
at controlP5.ScrollableList.setValue(Unknown Source)
at polargraphcontroller.addSerialPortControlFrame(polargraphcontroller.java:6220)
at polargraphcontroller.button_mode_serialPortDialog(polargraphcontroller.java:7106)
... 26 more
↧
Re: Anyone else out there running Controller on a Mac? [Solved!]
Hurray!
sn
↧
Controller installation on Windows 10
I've downloaded the controller software and tried both 32- and 64-bit versions...neither one would run on my Windows 10 computer (after installing the Java Runtime environment). I tried to download the 2.2.1 version of Processing, but Windows Defender says it has a virus (Trojan of some sort). So, I can't compile the controller locally. I'm stumped as to what to do next. Any thoughts??? Thanks!
Dave
↧
Re: Controller installation on Windows 10
I'll be honest: Running distributable Processing applications seems to be an absolute dog and always has been. The fact that I'm stuck on v2.2.1 has probably got something to do with it.
I just tried running the precompiled apps here, on my Windows 10 machine and it wasn't a pleasant experience. The 64 bit version fails silently after creating the default.properties.txt file. The 32 bit version actually did run, once I'd installed the Java runtime. I will dig into the system logs at some point to see what the real error underneath the 64bit version is. I think time might be better spent by porting to Processing v3x where I can actually get some support.
All the way along, my antivirus program (Bitdefender 2019) kept on intervening to protect me from all these dangerous executables I was creating. An exercise in frustration, but probably fairly typical.
Unfortunately, this is an unsolved problem. Having pre-compiled executable files was actually always a workaround to solve the problem of having to set up Processing and the libraries it requires, so that is still the "supported" way to run the controller app when all else fails. Unusually, neither Windows Defender nor Bitdefender had anything to say about my download of Processing 2.2.1 (from https://processing.org/download/) so that still worked ok from scratch.
Sandy Noble
↧
↧
Re: Controller installation on Windows 10
Just so I'm clear...are you saying that the virus alert is a false-positive? If so, and there's really no Trojan virus present, I'll ignore the warning and download/run the Processing installation file. Thanks!
Dave
BTW...I was able to get the controller to run on my Mac Mini, so I'm all set. I'll continue working on my Windows 10 installation as a backup.
↧
Re: Controller installation on Windows 10
Aha - I can't make any guarantees about anything - I can only repeat my experience: The file that I downloaded from http://download.processing.org/processing-2.2.1-windows64.zip has a SHA256 of 16D2533B59AD1D1D39DFBF055221CBD70680CFFB82F9EDDDB093071D7FF4B5DE and doesn't get flagged as having any problems when I scan it with Bitdefender. I tried a scan with Windows Defender yesterday and there were also no problems shown.
Of course it is possible that this is a false negative and I am super infected. I hope not, and a quick scan of the system shows nothing significant.
Sandy Noble
↧
Re: Controller installation on Windows 10
I downloaded the file from the link you provided and made an exception for it in Windows Defender. All went well and I now have the controller working on my Windows 10 machine as well. I wondered about exporting the code into a standalone app. Is that easy to do or should I stick with running the controller from within Processing? Thanks, again, for all your help!
↧
Re: Controller installation on Windows 10
Ah really good to hear. If you can run from source then I'd just do that. You get much better visibility of a load of useful feedback in the console (the bottom-half of the IDE).
It is really easy to export it though - I think it's just File -> Export application.
Sandy
↧
↧
The work of Patrick Tresset
The work of artist Patrick Tresset keeps popping up when I delve into Google looking for examples of polargraph art. He uses different technology to draw his images (see http://patricktresset.com/) but I'm interested in how he might derive that loose, sketchy style of converting photos onto paper.
Anyone got any ideas/pointers?
Thanks

↧
Re: The work of Patrick Tresset
Did you check out the research papers on his site? For example:
http://doc.gold.ac.uk/~ma701pt/patricktresset/wp-content/uploads/2015/03/computerandgraphicstresset.pdf
↧
Death to Sharpie and D2S-PDF basic questions
Just wondering whether there's anyone here who could answer some basic questions about the use of D2S and D2S-PDF. I must be missing something...I've downloaded, installed and run both sketches and receive the graphical output. I don't understand how to send that output to the Polargraph so it will be drawn. Maybe someone can point me in the right direction??? Thanks!
Dave
↧