Shop OBEX P1 Docs P2 Docs Learn Events
Nikos' Fibonacci Spiral Challenge — Parallax Forums

Nikos' Fibonacci Spiral Challenge

WhitWhit Posts: 4,191
edited 2015-06-26 11:52 in Robotics
attachment.php?attachmentid=114080&d=1430914782

This post - http://forums.parallax.com/showthread.php/154274-The-quot-Artist-quot-robot?p=1328384&viewfull=1#post1328384 on this thread http://forums.parallax.com/showthread.php/154274-The-quot-Artist-quot-robot has prompted the beginning of a new thread so as not hijack all the great documentation about Nikos' Artist Robot.

So, we challenge everyone and especially those who made submissions to the erco figure eight challenge to make a photo or video of your favorite artistic robot drawing a spiral pattern. Per Nikos' intent and erco's question - this can be any sort of spiral - see original thread.

Post away! When I can, I will post a video of the S2 completing the challenge. Till then, here are my still photos! Also attached is Spin for the S2.

attachment.php?attachmentid=114077&d=1430914486

attachment.php?attachmentid=114078&d=1430914486

attachment.php?attachmentid=114076&d=1430914486
«13456710

Comments

  • ercoerco Posts: 20,256
    edited 2015-05-06 07:34
    Whenever I can get to it, Trikebot's spiral will be a Fibonacci fake. Just how close I get depends on whatever trickery I can conjure out of the steering servo and the 1 PPR wheel encoder. I'll call it a Fibbonerco spiral.

    What should be very easy is a counterclockwise spiral feeding into a clockwise spiral, or vice versa. That's simply driving forward while slowly sweeping the steering servo from left to right. First I'll see how that comes out, then I will issue the official challenge for your differential steering, 8 cog, 4 gazillion PPR encoder bots to replicate that exactly. :)
  • WhitWhit Posts: 4,191
    edited 2015-05-06 10:23
    erco wrote: »
    First I'll see how that comes out, then I will issue the official challenge for your differential steering, 8 cog, 4 gazillion PPR encoder bots to replicate that exactly. :)

    I knew the pay-back would be rough!
  • NikosGNikosG Posts: 705
    edited 2015-05-06 13:25
    I repeated the Fibonacci challenge using S2 and GUI!

    The spiral was big enough so I used my black moquette and a chalk instead of whiteboard and marker

    attachment.php?attachmentid=114082&d=1430943222

    It is remarkable that S2 works fine on the carpet's surface with a chalk without any spacial preparation.
    I used a piece of paper in order to set the chalk into S2!
    here is the video :

    and the GUI code is attached.

    I’m working on some theory about circles and Arcs for S2 and ActivityBot very useful for spirals ….
    I'll come back with the educational material and a useful excel file for calculations..
  • WhitWhit Posts: 4,191
    edited 2015-05-06 21:16
    Fantastic Nikos! Ken Gracey and I had just been talking about how this could be done! Thanks for showing us how it is done. I may go at it another way...using the GUI - if it works I will post it here!

    Have you tried my code above Nikos? One of the things I love about the S2 is that the code should produce very similar results across many different S2s. This repeatability is amazing.
  • NikosGNikosG Posts: 705
    edited 2015-05-08 10:23
    A very useful piece of theory in order to make circles and arcs with your S2 robot using GUI:
    Using this way you set 100 the velocity of the one wheel =100 and then using two formulas you calculate the velocity of the other wheel and the time in order to achieve the appropriate arc (with certain radius and angle).

    attachment.php?attachmentid=114095&d=1431105629

    Using the above theory you can draw any Arc and any circle you want with your S2.

    So, If you can analyze a complicate spiral to simpler arcs, you can make amazing things with S2 and GUI!

    I also give an Excel file to help you with calculations...

    In the next image I have some Ideas that I'm going to try and I'll share with you.....

    attachment.php?attachmentid=114096&d=1431105763
    766 x 1230 - 423K
    937 x 1101 - 579K
  • ajwardajward Posts: 1,130
    edited 2015-05-08 15:41
    That's pretty darned cool Nikos! I'm happy to get my S2 to run straight lines! :-)

    Excellent work Sir!

    Amanda
  • WhitWhit Posts: 4,191
    edited 2015-05-08 19:13
    @All - for those of you who have not been following this, Nikos has recreated above some of the work that he has been doing with his Artist Robot, but in this case - re-written it specifically for the S2. This is great stuff for the classroom and as always documented very well.

    @Nikos - never fooled with .rar compression - trying to find a safe way to download it (without ad-ware, etc). Can't wait to see the calculator.

    Also, I think I have asked before, but what software do you use to produce the documentation files like the one above? They are so great! and wonderful in presentations to students! Bravo!

    I have been playing with the idea of having a robot run a labyrinth path - not by following a line or staying in the lines, but running the path...This is a simplified version of the Chartres Cathedral labyrinth and the full labyrinth. The simpler version might be a place to start...

    attachment.php?attachmentid=114102&d=1431141154

    attachment.php?attachmentid=114103&d=1431141165
    400 x 400 - 47K
    400 x 400 - 64K
  • PublisonPublison Posts: 12,366
    edited 2015-05-09 03:30
    @Whit

    I converted the .rar to a zip file for you.
  • ercoerco Posts: 20,256
    edited 2015-05-09 05:31
    Whit: Those mazes look like "your lower intestine" to quote Steve Martin.

    Here's a challenge. One bot starts drawing the line, spiral, whatever. A few minutes later, another faster bot starts following that line and must intercept the draw bot just as it finishes.

    Now I'd really like for you fellows to have that on my desk by 9am Monday. Chop chop! :)
  • WhitWhit Posts: 4,191
    edited 2015-05-09 05:44
    @Publison - Thanks so much! Saved me some time - what do you use to do that. Lots of those programs are fishy! Had some problems with windat too!

    @erco - neat idea! - our back log of challenges is growing faster than our solutions!
  • PublisonPublison Posts: 12,366
    edited 2015-05-09 05:51
    Whit wrote: »
    @Publison - Thanks so much! Saved me some time - what do you use to do that. Lots of those programs are fishy! Had some problems with windat too!

    I used WinRAR:

    http://en.wikipedia.org/wiki/WinRAR
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-05-09 08:00
    Or use 7-Zip which is open source and free of cost. Not fishy as far as I know.

    Nikos, nice presentation!
  • PublisonPublison Posts: 12,366
    edited 2015-05-09 08:08
    I have 7-Zip on another computer. Works well also. No issues.

    http://www.7-zip.org/
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-05-09 09:04
    It's on all of mine after I uninstalled WinRAR. The latter is best if you need to pack in RAR format, which 7-zip doesn't support (only unpacking). Everyone I work with use only zip, tar, or gzip, all of which 7-zip supports bidirectionally, so it works out well.
  • WhitWhit Posts: 4,191
    edited 2015-05-09 14:41
    Thanks Jim and Gordon - In biz now!
  • NikosGNikosG Posts: 705
    edited 2015-05-09 20:02
    Whit wrote: »
    .......
    I think I have asked before, but what software do you use to produce the documentation files like the one above? .

    Nothing special Whit! I use the windows paint and the "print screen key" in my keyboard!

    Whit wrote: »
    .

    .......This is a simplified version of the Chartres Cathedral labyrinth and the full labyrinth. The simpler version might be a place to start...

    What amazing spiral and maze simultaneously! I'll try to make it!
  • NikosGNikosG Posts: 705
    edited 2015-05-12 10:28
    In order to draw a complicate spiral with arcs and involutes using the S2 robot, a very good way is to divide the path of the spiral in small section of arcs.

    attachment.php?attachmentid=114141&d=1431451255

    Then for every separate arc we must find the center of the circle in which belongs, in order to measure the radius R and the central angle ω of the arc.
    If the arc AB is a semicircle it is very easy to find the R because R is the half of the string AB and ω = 180 degrees.
    attachment.php?attachmentid=114143&d=1431451331
    But for random arcs which are not semicircles we must find the center of the circle that the arc belongs.

    How to find the center of the circle in which belongs a random (not a semicircle) arc AB:

    Supposing we have an arc AB and we want to find the center of the circle in which the arc belongs.
    We can do that in 5 steps:

    attachment.php?attachmentid=114142&d=1431451319
    When we have these two parameters R and ω of the arc, we can easily calculate the speed of each wheel as well as the time that is needed from the formulas: b=100*(2R-d)/(2R+d) and time=π*(2R+d)*0,08451*ω/360 from post#6

    In the next post I'll give a full example with a complicate spiral and the use of GUI in conjunction with the S2 robot.

    (for the above images I used the "Geogebra" software (free version)
    697 x 349 - 33K
    431 x 349 - 13K
  • WhitWhit Posts: 4,191
    edited 2015-05-12 22:14
    @Nikos - Great stuff.

    Okay - Here is my attempt at drawing the walking or rolling path of a labyrinth. This is not maze solving, but writing a program to "scribble" the path. I did notice that the simplified labyrinth that I posted above had a "dead spot" - no path actually went there. So, I modified the drawing. Here is what I am calling a Westminster Labyrinth Modified (again, this is a simplified Chartres Labyrinth.

    Labyrinths used for prayer and reflection are intended to represent the spiritual journey. At times you get very close to the center and the next moment find yourself far away. The goal and lesson is about walking the path faithfully - one step at a time focusing on the journey - not the destination. Here ends the lesson. Sorry!

    attachment.php?attachmentid=114155&d=1431493891

    Below, you will find an Excel Calculator that I modified using Nikos FABULOUS version (see above) as a template. I changed up some his colors to make it consistent with the S2 Program Maker GUI and to add a chart for this particular project. (There is also a pdf of the latest version v.3.5). Attached also is the GUI program. Give it a try on your S2.

    Here is a photo of multiple runs (not a blurry photo) used to refine the path and arc lengths. Amazing repeatability with the S2 - you can see each slight tweaking of an arc's length - all this was done using the handy Excel calculator. It has two parts per Nikos' Original - It calculates the time to run any distance in cm with wheel speed set at 100, 100 and it calculates the time to run an arc at a fixed radius in cm and an angle of ω, one wheel is set at 100 - and it also calculates the speed of the other wheel (for the same radius).Then you just enter the values in the Motion Control Tile on the S2's Program Maker Software! Amazing and fun!

    attachment.php?attachmentid=114156&d=1431493911

    Here is my best so far - Based on v.3.5. Still not perfect but, pretty darn close

    attachment.php?attachmentid=114164&d=1431494996

    And finally a video of the run!

    Hey Nikos - Thanks so much for developing these tools for drawing with the S2 using only the GUI! This is really fun stuff! I learned a lot playing with Excel too and about creating simple tools to help with the work!
  • NikosGNikosG Posts: 705
    edited 2015-05-12 23:04
    Whit this is Incredible!

    This labyrinth needs a lot of detail and perseverance to be designed!

    Excellent work! And a wonderful example that combines the art from an ecclesiastical monument and robotics!!!!

    Your Excel file is almost the same with that I'm trying to create right now! Excellent work again!!!!!


    I'll try to program the "artist" to do the same!
  • WhitWhit Posts: 4,191
    edited 2015-05-13 05:03
    Thanks Nikos!

    I believe that if I made a better drawing (so as to measure the arc angles more accurately), that your calculator would yield almost perfect results! I was estimating angles at first only with in about 10 degrees! So, great angles would yield a great path. That is what I tweaked based on what I was seeing.

    I want to try this with Arlo! I would love to see the Artist do it too! I would like to move at walking speed so that you could walk behind it - thus walking the labyrinth without a labyrinth! Got some other fun ideas too!

    Thanks agin for your great work, inspiration and encouragement!
  • NikosGNikosG Posts: 705
    edited 2015-05-13 17:22
    Whit wrote: »
    Thanks Nikos!

    I believe that if I made a better drawing (so as to measure the arc angles more accurately)

    Whit, I made the Westminster Labyrinth for you, using Geogebra.!

    Measurments have the best accuracy (from the software)

    I send you the file from Geogebra for further use or more information.
    If you are not familiar with Geogebra here is a screen shot with the necessary information (R and ω) for every arc!

    attachment.php?attachmentid=114175&d=1431595849

    Please feel free for any question.

    I'm sorry for the rar file but I can't compress it with other way


    Edit: I changed the abobe image
  • WhitWhit Posts: 4,191
    edited 2015-05-13 19:37
    @Nikos - Thanks so much! That is exactly what I wanted. Geogebra is an amazing piece of software. Thanks again for a great tip! Are you using it online or on you device?

    Going to play some more right now!

    By the way the rar file is no problem now. A couple of our Forum Friends got me hooked up with some great software to open that file type!
  • NikosGNikosG Posts: 705
    edited 2015-05-13 21:57
    Whit wrote: »
    .... Are you using it online or on you device?

    I use Geogebra on my computer. It has a very easy and "light" istalation and you can uninstall it very easily if you don't need it any more.


    EDIT: On post #22 replace the three angles ω=36,25 with the ω=136,25 (I'll send the image again)
  • WhitWhit Posts: 4,191
    edited 2015-05-14 04:38
    NikosG wrote: »
    I use Geogebra on my computer. It has a very easy and "light" istalation and you can uninstall it very easily if you don't need it any more.


    EDIT: On post #22 replace the three angles ω=36,25 with the ω=136,25 (I'll send the image again)

    @Nikos - I installed it last night! Fun software! Thanks for the updates. I am going to draw the labyrinth too - just to learn how to use Geogebra better!
  • NikosGNikosG Posts: 705
    edited 2015-05-14 06:34
    Here is my first attempt for the Westminster labyrithm with the "artist" and Simple-IDE (C- code)
    A similar try with the S2 and a Chalk (using your code from post #19) was by far better. However I think that I need a chalk mechanism for the S2!

    attachment.php?attachmentid=114179&d=1431610305


    I also agree with you that the first left turn (this one after the first line, must be 70 degrees and not 90, as I have put in my geogebra file)

    I'm working on a new excel that you can define the total size of the drawing......
    I'll come back with more improvements......
    800 x 600 - 210K
  • WhitWhit Posts: 4,191
    edited 2015-05-14 11:53
    @Nikos - Great job! My first attempts looked almost exactly like that too, but my very first attempt had a couple of arcs toward the end of run in the wrong direction and the S2 headed off in some crazy direction! ;-) The skewed entry and exit lines were characteristic of my first attempt too. Adjusting the code until they became parallel was part of my tweaking.That is why the code posted was version 3.5 (I had 1, 2, 3, 3.1, 3.2, 3,3, 3.4 and then 3.5!)

    Geogebra is fun, but I have not fully got the hang of it yet! Whew! I am enjoying playing with it, but it is very different from CAD programs, with which I have some experience. (I was an Architect prior to becoming a priest and still have access to very good CAD programs - but I am very rusty using them and I have not kept up with more recent updates).

    Great idea about a multiplier in Excel to control the size of the drawing!

    I too was planing a chalk mechanism for the S2 pen port. I was envisioning a spring loaded or gravity feed tube with the barrel being a bit bigger than the diameter of the standard chalk board chalk. Don't know if the chalk would fit though the pen port. Will post more on this as I work out the details.

    Having fun working on this with you! Can't wait to see a video the Artist drawing the labyrinth path!

    I also have another idea for us to try - It would be a great demonstration project - More on that later!

    Edit - Just got an old version of AutoCad with the Architectural Desktop from Dad (a retired architect). Will give that whirl to to help generate a drawing for the Labyrinth itself and the path with full dimensions - and in keeping with the spiritual theme of the Labyrinth Project - it will include the Angles and Arc-angles (sorry it is bad pun - I know!
  • ercoerco Posts: 20,256
    edited 2015-05-17 07:47
    I'm still buried for at least another week (paying jobs, plus getting ready to teach my first robotics class on May 23!) so I'm just watching to see who else is playing here. Martin_H? I did buy some posterboard to trace my bot's spiral path. But I'll have re-work trike bot first. I need to install a pen holder right dead center of the steel rear axle (chop & channel). And it's currently so lightweight that pulling the pen will probably throw off the tracking, so I'll need to fiddle with adding weight and how the pen floats.

    I need one extra day each week, off the grid, to do my side projects.
  • NikosGNikosG Posts: 705
    edited 2015-05-18 04:48
    Now I’ll try to explain the drawing of a spiral very similar to a “polynomial spiral" that is a kind of a “Cornu spiral “
    attachment.php?attachmentid=114227&d=1431949274
    This spiral is symmetric, so we need calculations only for the half part. For the second symmetric part we only change the order of the commands
    We divide the spiral into small arcs,and we measure R and ω as I have analyzed on post#18 . Then we calculate speed and time.(Using the Excel file)
    Here is an attempt with the Artist robot.
    attachment.php?attachmentid=114230&d=1431949419
    The S2 is equally accurate !
    For rhe calculations you can play with Excel file in order to change the dimensions of the spiral using your S2 robot
    The attached S2 code draws the polynomial spiral with size 3.

    Whit (and any other folks) you can try the S2 code using a surface 80cm X 50cm

    Edit : If you change the time of the circle (in the midle of the code) you can get a variety of versions of that Polynomial spiral: The two parts of the spiral very close each other, or the two parts in a distance etc.....
  • WhitWhit Posts: 4,191
    edited 2015-05-18 21:52
    NikosG wrote: »
    Whit (and any other folks) you can try the S2 code using a surface 80cm X 50cm

    @Nikos - I ran this on my S2 and did not get the same results. I will run it on another S2 and make some photos when I get a chance. If I still have issues, I will play with it some and let you know my results. This is still amazing work. I love the new Excel calculator and how it looks too.

    I have been busy working on the Wesminster Labyrinth Modified. I did get AutoCAD loaded and made the attached sketch. I will try to dimension it with radii and arc angles. Then I will create a new calculation chart and see how the results vary from my previous effort. I will post that too.

    Please take a look at the attached pdf drawing of the Westminster Labyrinth Modified. It has the proportions that I think are correct for the design I wanted. Now if I can get my S2 to draw that path. I would like to print the Labyrinth and then have the S2 scribble the path too and see if the two matched at least pretty well.

    attachment.php?attachmentid=114235&d=1432011123

    Keep up the very interesting work!
  • NikosGNikosG Posts: 705
    edited 2015-05-18 22:57
    Excellent Whit!!!

    It seems very precise !!!!!

    The labyrinth with geogebra on post #22, was made with the same method.
    I put the westminser’s labyrinth as background . Geogebra menu has that ability.

    attachment.php?attachmentid=114236&d=1432014942

    However your work with AutoCAD is much more detailed !

    I’m waiting for your new calculation chart in order to try again!

    Meanwhile I’m trying to find a solution for chalk mechanism for the S2 …
    663 x 556 - 352K
Sign In or Register to comment.