Walking Lines 1

Semi-random lines sketchIn the week 2 tutorial for KKB211 – Computational Arts 2, we are looking at doing walking lines in our chosen development tool.

Walking lines are effectively randomly generated paths that the lines follow to create a random image.

I have been using Processing for this particular focus. Thus far I have random lines, however they don’t follow any particular path as of yet. This is effectively still walking lines as the position of the lines is added to and built on. Unfortunately this actually draws a new line every frame that is not necessarily joined to the line from the previous frame.

Have a look at it online here.

The code used to do this is extremely simple and just involves a few random variables based on the width and height of the canvas. I don’t believe this is entirely stochastic because the randoms are tightly controlled, but it is random within its boundaries (unless you want to get into the nitty gritty of it, which I don’t).

The source code is available after the jump.

void setup()
{
size(400, 400);
strokeWeight(10);
smooth();
background(0);
}

void draw()
{
float r = random(0, height);
float x = random(0, width);
stroke(r, 100);
line(random(r), random(width), random(x*2), random(height));
}

Tags: , , , , ,

45 Responses to “Walking Lines 1”

  1. […] on from the original walking lines I did in Processing, I went on to develop this version of it. This is done effectively the same way […]

  2. Hello there! This is kind of off topic but I need some help from an established blog.
    Is it hard to set up your own blog? I’m not very techincal but
    I can figure things out pretty fast. I’m thinking
    about creating my own but I’m not sure where to begin. Do
    you have any tips or suggestions? Thanks

  3. Hi there! I could have sworn I’ve visited this blog before but after
    browsing through many of the posts I realized it’s new to me.

    Anyways, I’m certainly pleased I discovered it and I’ll
    be bookmarking it and checking back frequently!

  4. I’m not that much of a online reader to be honest but your blogs really nice, keep it up!

    I’ll go ahead and bookmark your website to come back later.
    Many thanks

  5. I have learn several excellent stuff here. Certainly price bookmarking for revisiting.

    I surprise how much effort you put to make this type of great informative website.

  6. I read this paragraph fully regarding the resemblance
    of hottest and earlier technologies, it’s remarkable article.

    Here is my weblog: 24 hour hvac repair 19009

  7. Yes! Finally someone writes about tao of badass.

  8. What’s up, after reading this amazing article i am too
    delighted to share my knowledge here with friends.

  9. Superb blog! Do you have any tips for aspiring writers? I’m planning
    to start my own website soon but I’m a little lost on everything.
    Would you advise starting with a free platform like WordPress or go for
    a paid option? There are so many choices out there
    that I’m totally overwhelmed .. Any ideas? Many thanks!

  10. Whilst we are all at first stunned and disappointed, the iPhone 4S’ amazing top-end attributes impressed us.
    Be ready to inquire the tough concerns and uncover what you can anticipate from exactly where you want to live.

  11. excellent issues altogether, you simply won a new reader.
    What might you recommend about your publish that you just made
    some days ago? Any positive?

  12. tinylink.in says:

    The watches vary from flirty and fun to sophisticated
    and elegant. Fossil provides countless watches to select from.
    Leather straps using a gloss are also a good selection.

  13. Excellent beat ! I wish to apprentice at the same time as you amend your site, how could i subscribe for a blog site?
    The account helped me a applicable deal. I were a little bit familiar of this your
    broadcast provided bright clear idea

  14. You can also click ‘Load File’ to incorporate DVD/IFO out of your hard drive.
    We both searched the window out down the key road. They are incredibly portable, user friendly and convenient.

  15. Appreciate this post. Let me try it out.

    my webpage biological dentist Elk Grove

  16. You actually make it appear really easy with your presentation however I in finding this topic
    to be actually something which I think I might never understand.

    It kind of feels too complicated and extremely extensive for me.

    I’m taking a look ahead to your subsequent publish, I’ll try to
    get the cling of it!

  17. Thanks for your marvelous posting! I actually enjoyed reading it, you happen to be a great author.I will remember to bookmark your blog and will come back later in life.
    I want to encourage one to continue your great job, have a nice evening!

    Here is my weblog root canal therapy Elk Grove