Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Guilloche Patterns
Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Guilloche Patterns
on: May 18, 2013, 05:01
Quote

I have been really keen to draw some guilloche patterns ever since I saw this youtube videohttp://www.youtube.com/watch?v=BG9e06IWAxE of a 4 bar linkage type machine producing really beautiful patterns from an apparently simple mechanism. So I set out to model the machine in software and draw the patterns from svg input to polar graph. Lets see if this attached picture works..
Image

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: May 18, 2013, 05:16
Quote

The drawings look really cool but to really get them looking great I think I'll need to find a firmware which does some kind of interpolation between points to avoid the stop start nature of the motion (causes bleeding from the pen) and also avoid the small straight line segments between each point (rounded would be better for drawings like this). here's a closeup so you can see what I mean.
Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: May 18, 2013, 12:34
Quote

Man this looks really good. I actually like the stepped quality of the output, there's a real 3d quality evokes by the differences of thickness of line that I totally didn't expect to see. Do you think there'd be an issue with generating something like that in the arduino rather than externally?

I admit, I too have watched covetously at that youtube vid, and started planning a machine just like it, when I realised, after sorting out the spiral drawings for polargraph that I already had a machine that could do that bit, and a lot more besides. I was going to wait until I had something to show, but this is so far:

Image

I haven't figured out how to get the main rotor rigged up yet, and need a bit of cushioning on the outer rim of the turntable, but I forsee an app that takes in two waveforms (either sampled or synthesised), a slider for phase. OR something.

great stuff!

sn

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: May 22, 2013, 10:21
Quote

Cool frankenmachine! Patterns like the ones I've been drawing are modeled on the mechanism shown in the video but is more fun to see the mechanism in action I suppose.
As for generating on the board itself that's definitely possible. The external software generation allows for a preview of what will be drawn though which is useful. There are a lot of less interesting patterns in guilloche space. But then again the mechanical machine doesn't offer any previews and produces great drawings. I'd love to help get a firmware guilloche method in there - the maths is all here already in my code

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: May 26, 2013, 18:23
Quote

Great stuff, of course you are welcome to start on it yourself if you'd like (the sources are all in github), but if you like to drop me some of your clever code I can make a start in integrating it. I'm pretty busy at the moment though, so not going to happen for a couple of weeks.

sn

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: July 13, 2013, 02:51
Quote

VB.net code for generating the curve is as below. Its based on the solution to a 4 bar linkage given here http://synthetica.eng.uci.edu/~mccarthy/mechanicaldesign101/McCarthyNotes-2.pdf

        Dim list As New PointPairList
        Dim list2 As New PointPairList
        Dim list3 As New PointPairList


        Dim i As Integer, m1x As Double, m1y As Double, m2x As Double, m2y As Double


        Dim t As Double = 0

        Dim period1 As Double = Convert.ToDouble(M1Textbox.Text)
        Dim period2 As Double = Convert.ToDouble(M2Textbox.Text)
        Dim period3 As Double = Convert.ToDouble(M3Textbox.Text)

        Dim m1center(,) As Double = New Double(,) {{Convert.ToDouble(M1XTextbox.Text), Convert.ToDouble(M1YTextbox.Text)}}
        Dim m2center(,) As Double = New Double(,) {{Convert.ToDouble(M2XTextbox.Text), Convert.ToDouble(M2YTextbox.Text)}}
        Dim m3center(,) As Double = New Double(,) {{Convert.ToDouble(M3XTextbox.Text), Convert.ToDouble(M3YTextbox.Text)}}

        Dim TimeStep As Double = Convert.ToDouble(TStepTextbox.Text)
        Iterations = Convert.ToDouble(IterationsTextBox.Text)
        For i = 0 To Iterations

            Dim theta2 As Double = 2 * PI * (t / period1)



            Dim k1 As Double, k2 As Double, k3 As Double, alength As Double, blength As Double, clength As Double, dlength As Double

            alength = Convert.ToDouble(aLengthTextbox.Text) ' M1 radius
            blength = Convert.ToDouble(bLengthTextbox.Text) 'link lengths
            clength = Convert.ToDouble(cLengthTextbox.Text)
            dlength = Sqrt((m2center(0, 0) - m1center(0, 0)) ^ 2 + (m2center(0, 1) - m1center(0, 1)) ^ 2) 'distance between motors

            Dim radius2 As Double = 80 'M2 radius
            radius2 = Convert.ToDouble(M2LengthTextbox.Text) ' M1 radius 'M2 radius

            k1 = dlength / alength
            k2 = dlength / clength
            k3 = ((alength ^ 2) + (clength ^ 2) + (dlength ^ 2) - (blength ^ 2)) / (2 * alength * clength)

            'calculate the motor positions
            m1x = alength * Cos(theta2) + m1center(0, 0)
            m1y = alength * Sin(theta2) + m1center(0, 1)
            m2x = -radius2 * Cos(2 * PI * (t / period2)) + m2center(0, 0)
            m2y = -radius2 * Sin(2 * PI * (t / period2)) + m2center(0, 1)


            'calculate the linkage position

            list.Add(m1x, m1y)
            list2.Add(m2x, m2y)

            Dim Cterm As Double = k1 - (k2 + 1) * Cos(theta2) + k3
            Dim Bterm As Double = -2 * Sin(theta2)
            Dim Aterm As Double = Cos(theta2) - k1 - k2 * Cos(theta2) + k3

            Dim Theta4 As Double = 2 * Atan(-Bterm - Sqrt(Bterm ^ 2 - 4 * Aterm * Cterm)) + PI / 4

            Dim xlink As Double = clength * Cos(Theta4) + m2x
            Dim ylink As Double = clength * Sin(Theta4) + m2y

            list3.Add(xlink, ylink)

            Dim m3radius As Double = Sqrt((xlink - m3center(0, 0)) ^ 2 + (ylink - m3center(0, 1)) ^ 2) 'find the radius of the wheel center to the linkage

            Dim wheelangle As Double = Asin((ylink - m3center(0, 1)) / m3radius)

            Dim wheelRotated As Double = wheelangle + (t / period3) * 2 * PI

            Dim xpen As Double = m3radius * Cos(wheelRotated) + m3center(0, 0)
            Dim ypen As Double = m3radius * Sin(wheelRotated) + m3center(0, 1)

            list4.Add(xpen, ypen)

            If i = 0 Then
                xmin = xpen
                ymin = ypen
            End If

            If xpen < xmin Then
                xmin = xpen
            End If
            If xpen > xmax Then
                xmax = xpen
            End If
            If ypen < ymin Then
                ymin = ypen
            End If
            If ypen > ymax Then
                ymax = ypen
            End If

            xrange = Abs(xmax - xmin)
            yrange = Abs(ymax - ymin)

            XPointList.Add(xpen) 'generate list for pinting svg with seperating , between x and y and spaces between points
            YPointList.Add(ypen)
            'save as datatable for svgC

            'PlotData.Columns.Add("x", GetType(Double))
            'PlotData.Columns.Add("y", GetType(Double))
            'PlotData.Rows.Add(xpen, ypen)

            t = t + TimeStep
        Next i
Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: February 18, 2014, 02:20
Quote

I made a git repository containing the code for my Guilloche app here:
https://github.com/Chojins/Guilloche-Designer

I have also been working on a new machine run from linuxCNC. To get smooth feed and clean lines on the guilloche patterns a proper CNC controller seems like the business. Heres a couple videos of the first spiral off the new machine:

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: February 19, 2014, 23:55
Quote

These look amazing - thanks for posting about it! Do you have to do much work to linuxcnc to get it running with this coordinates system?

sn

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: March 4, 2014, 21:50
Quote

It wasn't too much work actually since the kinematics for the bipod have been done before here http://wiki.linuxcnc.org/cgi-bin/wiki.pl/uploads/wiki.pl?Koppi%27s_Toy
I've just added a micro servo linked to the Z axis to do the pen lift so might make a new git with the configuration files. Hoping to add another servo in future to add paint flow rate control to my airbrush gondola. Its pretty easy to add new things in LinuxCNC

Also want to get a good reliable homing system up and running, preferably something that will scale easily. right now I'm thinking of running extra strings from the gondola with beads at known distances that will trigger microswitches. Have you seen any really clever homing solutions Sandy?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: March 4, 2014, 22:03
Quote

Nothing very clever exactly, but lots of variations on what you'd expect. Beads, magnets, conductive foil and springs. Funnily enough, I just posted this video (https://plus.google.com/108985599431112054442/posts/ispShq8BLtk) that shows my own, first ever homing routine. This uses reed switches and little magnetic beads. I'm not sure if I will stay with this, but I've got a few other options.

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: March 4, 2014, 22:46
Quote

Yeah seems like as good a method as any. What exactly are you using the encoders for?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: March 5, 2014, 01:32
Quote

Just closing the loop - this needs to be a robust machine that will keep its calibration even with rough handling.

Chojins
Newbie
Posts: 19
Permalink
Chojins
Post Re: Guilloche Patterns
on: March 22, 2014, 01:54
Quote

I've got a homing system up and running using a bead on a light string running from the gondola

Also you'll be pleased to know Sandy I have reverted to the polagraph beaded cord and pulley system. I'm getting good feed rate and quite nice line quality. Think my gondola needs some more fine tuning to get it really smooth though.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Guilloche Patterns
on: March 23, 2014, 21:58
Quote

That's a rather handsome idler wheel and switch holder! Good solution. I'm constantly oscillating between thinking the beaded cord is a great idea, or a real pain... Can I ask what made you try it out again?

sn

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