pattern within an organic shape

mariathurn's Avatar

mariathurn

23 Nov, 2017 12:35 PM

Hello!

I want to do a pattern within a shape. And the closer the pattern comes to the border of the shape it is supposed to become smaller. The shape is not is organic.
I have come so far yet. Is there a possibility in Nodebox to do that, or do I have to do that in Grasshopper?

Many thanks, if anyone has an answer.

  1. Support Staff 1 Posted by john on 24 Nov, 2017 09:28 AM

    john's Avatar

    Hi Maria,

    I'm not entirely clear on what you mean by "organic". Could you post an example of the effect you are trying to create?

    You are already using the compound node to clip a repeating pattern inside the boundary of a shape. Making each element of the pattern change size as it approaches the boundary is trickier, but there are ways to do this.

    I am attaching one simple example. I fill a grid with dots and use a compound node to clip them to the shape of a footprint. A normal dot (ellipse) has a pointCount of 13. Dots on the boundary which get partially clipped will have some other pointCount. I can use this fact to distinguish those boundary dots and make them smaller (instead of just clipping them).

    When drawing the pattern I replace the dots with stars. If you look closely at the screenshot you can see that the stars around the edge of the footprint are smaller than the stars in the interior. I also wiggle and randomly rotate them for a less rigid (more organic?) look.

    This is a simple but somewhat crude technique since it only produces two sizes. If you want something fancier, maybe an Escher-like hyperbolic effect, you may need to do some trigonometry, but with determination almost anything is possible in NodeBox.

    If this technique doesn't work for you, send me an example of what you are trying to achieve and I could take another whack at it. Please let me know if this helps.

    Thanks!

    John

  2. 2 Posted by mariathurn on 24 Nov, 2017 01:52 PM

    mariathurn's Avatar

    Hey John,

    Thanks for the reply!

    I want to recreate a pattern on a outsole of a shoe. That the pattern adapts to the outline. Maybe if I have points that act as centers and then take the distance between them and the border. I don't know...

  3. Support Staff 3 Posted by john on 24 Nov, 2017 10:05 PM

    john's Avatar

    Maria,

    Wow - what an interesting challenge!

    I spent a few minutes looking at shoe print clip art and the soles of actual shoes, boots, and sneakers (two examples attached). Each one is different - and some are fabulously complex. It's a whole art form of compelling beauty that was right under my feet this whole time.

    You've already made a great deal of progress, but this is a hard problem. One thing I notice is that most shoe prints are organized around sinuous patterns that flow like a snake or a stream, following the natural curves of a foot. I begin to see what you mean by "organic".

    One way of approaching this would be to develop a "language" of core concepts - which could be expressed by subnetworks. NodeBox currently lets you stack shapes like rectangles or ovals. One useful component would be a curved stack that follows a supplied curve instead of a straight line.

    You could then add an additional concept of controlling the size within a curve of shapes so that the shapes grow and shrink as they follow the curve. That pattern of growth and shrinkage could itself be controlled by a "growth curve".

    The next step would be to build up methods for producing the shapes within each stack. You could start with rectangles or ellipses or polygons as base elements and then soften or distort them in different ways. You might find my curvify subnet useful for this (http://support.nodebox.net/discussions/show-your-work/211-curves).

    The shapes could then be fed into a clipping subnet that modifies shapes that cross the boundary of the shoe. For a softer edge you could do an ordinary compound then extract the inflection points and reconnect them with my curvify to produce more organic outlines.

    Once you have the nodes to express these concepts you can string them together in a myriad of different ways to create footprints composed of separate regions that fit together to form the overall pattern. NodeBox would let you scrub various settings to get the effect you want. You could then create endless variations, each one unique.

    Not easy but definitely possible. I might try noodling around with this some more. Feel free to keep this dialog going.

    John

  4. 4 Posted by mariathurn on 28 Nov, 2017 09:52 AM

    mariathurn's Avatar

    Hey John,

    Wow, this does seem quite tricky. Thank you for your incredible feedback and ideas. I'll definitely do some further explorations into that topic. It's interesting what complex system you can create by a seemingly simple piece of software.
    If I ever have a breakthrough I'll post it here :)

    Thanks again!

  5. 5 Posted by D on 29 Nov, 2017 02:31 AM

    D's Avatar

    Hi Maria,

    Yes, Rhino might be better suited for your project, specially if you plan to 3d print the pattern. You can certainly use grasshopper if you are planning to feed pressure data etc. But Rhino, will work just fine for the parametric design you need, just search for 'Rhino Panelling Tools' on google or better yet youtube for tutorials

    Best,

  6. Support Staff 6 Posted by john on 19 Dec, 2017 12:22 PM

    john's Avatar

    Maria,

    Just wanted to let you know that I became fascinated with this problem and am still working on it. I am finally starting to make some progress and can now make various organic-looking shoe patterns. See attached screenshot.

    Are these the kind of patterns you were looking for?

    Along the way I have invented a dozen specialized nodes to soften curves, spread grids, trace outlines, etc. By combining them you can create endless variations and do things that go far beyond shoes. The process is still a bit more complicated than I'd like, though.

    Let me know if you are still interested in this problem. If you are I could eventually post a shoe-making kit of some kind.

    John

  7. Support Staff 7 Posted by john on 03 Feb, 2018 10:39 PM

    john's Avatar

    Another update...

    I wrote a blog entry about this project:

    http://theappslab.com/2018/02/01/shoe-treads/

    I also just posted a demo on the NodeBox forum with code to perform six basic tasks that make drawing organic shapes (including shoe soles) much easier:

    http://support.nodebox.net/discussions/show-your-work/250-visual-tasks

    Enjoy!

    John

  8. 8 Posted by Mikołaj on 10 Mar, 2018 01:34 PM

    Mikołaj's Avatar

    Hi John,
    I'm really really interested in learning how did you make it work. I've read your post about six visual tasks, but I still don't get it, how to move over to such a great thing like you did with a shoe.
    I was researching the internet, and nodebox is still not as popular as grashopper, but I saw that there are some attractor lines/points/curves to use.
    The problem is - I don't have grasshopper, and I still would like to achieve this kind of effect to make ventilation holes.

    Could you help John?
    Best regards,
    Mikołaj

  9. Support Staff 9 Posted by john on 10 Mar, 2018 11:41 PM

    john's Avatar

    Hi Mikołaj,

    I would be happy to help if I can.

    First I would need to get a clearer idea what you are trying to do. If you actually want to great a 3D model for printing or manufacturing an object with ventilation holes, NodeBox is not the tool you want. NodeBox is basically 2D only.

    However, if you just want to create some sketches to try out various possible designs, NodeBox might work. If you've never used NodeBox before, you might want to play with it a bit and maybe read through some of the tutorials first so you get the hang of it.

    Once that is done, I suggest you take a stab at drawing a rough shape (even a rectangle will do for a start) with a set of ventilation holes represented by circles (ellipses). You can use a scatter node to place them at random if you want. Fiddle from there until you get stuck and then send me another note - either reply here or start a new discussion. Attach a copy of your Nodebox file so I can see what you are trying to do. You can also attach a simple drawing or photograph showing the effect you are trying to achieve.

    If you will do that, I will engage with you and we can go back and forth until we get it right.

    I hope I can help you!

    John

  10. 10 Posted by Mikołaj on 11 Mar, 2018 10:19 AM

    Mikołaj's Avatar

    Hi John,

    Ok, I should have been more precise. So this is the moment to explain what I'd like to do precisely ;)

    Long story short: I am working in SOLIDWORKS and I'd like to import curves generated by nodebox and then make some extrusions to prepare vent holes :)

    I am doodling with nodebox and achieved first effects, but these are just what I can do. I'm affraid, that I need to learn to think in terms of maths and algorithms to make exactly what I want. (I'm an egineer, so I think I can, do it, but I've never liked programming because of lack of imagination - like I do have in 3D modelling ;))

    I attach some doodles from my trials end errors as well as some pinterest example of what I'd like to achieve ;)

  11. Support Staff 11 Posted by john on 12 Mar, 2018 12:52 AM

    john's Avatar

    Hi Mikllaj,

    I think NodeBox is the perfect tool for this task. Did you make your doodles using NodeBox? If so, you are already pretty close.

    Your first example, attractor1, is the easiest. I'll show you how I replicated it and then will tackle the other two examples later. I am attaching:
       - your original reference photo
       - a screenshot of my NodeBox network replicating it
       - an SVG file of just the holes (to import into SolidWorks)
       - a zipped file with the ndbx file and make_curve.py custom code

    Making the grid is child's play. I use a 20 by 20 rectangle, colorized to be hollow (set fill to 0 alpha, stroke width to 1), and attach a grid node with 24 columns and 30 rows. Adjust grid height and width to make the cells align.

    The curve is a little trickier. This curve has two inflection points, but NodeBox's quad node only lets you make curves with a single inflection. So I was forced to use my custom make_curve node which requires that you add a Python code file to your document library. I then fiddled with the control points until the curve matched your reference image.

    The final piece is the dots. After some experimentation I confirmed that the diameter of the dots in the reference image is proportional to the minimum distance from each cell to the curve. To calculate that I made a NodeBox subnetwork called minDistance. I feed the centroids of the 24x30=720 cells and 50 sample points along the curve into minDistance and it returns 720 minimum distances, one for each cell.

    If you Edit Children of that node you will see that it is extremely simple: just a distance node and a min node. So why did I need to wrap it into a subnetwork? Because, in order to work properly, I need to take the cell centroid points one a time but take sample positions along the curve all at once as a list. If you select minDistance and bring up the Metadata dialog you will see that I set the range of point1 to value and the range of point2 to list. There is no way to achieve this effect without making a subnetwork.

    (Aside: subnetworks are the most essential and most confusing aspect of NodeBox. Beginning users assume that subnetworks are merely a way to hide complexity like file folders, but actually their main purpose is to coordinate inputs so that some can be fed in as values and some as lists.)

    The rest of the network is easy. I convert distances to dots, normalize the size of the dots, and combine everything together along with a whitish background. I also reset the Document Properties so that the width and height of the export window matches the grid.

    To export the entire image, render the combine node at the bottom. To export just the holes (as I did to create the SVG), render the ellipse node just above that. Of course you can adjust the gird and shape of the curve as you want. The NodeBox network is yours to do with as you will.

    Please let me know if that helps and if you have any questions. As time allows I will tackle your other two examples in subsequent comments.

    John

  12. 12 Posted by Mikołaj on 14 Mar, 2018 10:22 AM

    Mikołaj's Avatar

    Hi John,
    that solution rocks! Yes, doodles were made using nodebox. I've reviewed some examples and then merged them with my invention :)

    Thank you for your reply, I'll try to experiment more on this topic, but I'm still very much attracted by grasshopper for Rhino. I think these are pretty similar tools in terms of visual programming (of course grasshopper is more sophisticated and much more powerful I think).

    Best regards,
    Mikolaj

  13. Support Staff 13 Posted by john on 14 Mar, 2018 07:48 PM

    john's Avatar

    Thanks, Mikolaj. Glad you found it helpful.

    Yes, Grasshopper looks more powerful than NodeBox, and certainly more appropriate for 3D work, but also seems more convoluted to me. I find NodeBox to be a simpler and more elegant tool. Were you able to translate your NodeBox networks (or my solution) directly into Grasshopper?

    Let me know if you would still want me to try rendering your other two examples into NodeBox.

    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Bildschirmfoto_2017-11-23_um_13.32.53.png 414 KB
  • Bildschirmfoto_2017-11-23_um_13.33.36.png 74.7 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

20 May, 2018 09:12 PM
20 May, 2018 01:35 AM
16 May, 2018 07:43 PM
11 May, 2018 09:56 AM
10 May, 2018 09:39 AM

 

09 May, 2018 06:37 PM
08 May, 2018 10:19 AM
07 May, 2018 04:30 AM
03 May, 2018 11:03 AM
03 May, 2018 07:15 AM
30 Apr, 2018 06:41 PM