Coffee + Grasshopper Discussions - Grasshopper2024-03-29T08:55:40Zhttps://www.grasshopper3d.com/groups/group/forum?groupUrl=coffee-and-grasshopper&feed=yes&xn_auth=nosorting algorithm for xy plottertag:www.grasshopper3d.com,2014-09-25:2985220:Topic:11372532014-09-25T12:42:19.475ZChristian Schmidtshttps://www.grasshopper3d.com/profile/ChristianSchmidts
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654869510?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654869510?profile=RESIZE_1024x1024" width="750"></img></a></p>
<p></p>
<p>As I managed to get my pen plotter (a nice Roland DXY-1150A) working with gh via <a href="http://music.columbia.edu/cmc/chiplotle/" target="_blank">chiplotle</a> (a also nice library that enables you to talk to the plotter via usb to serial port interface) all I need to be happy is the right sorting algorithm for the curves..</p>
<p></p>
<p>Will post some of…</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654869510?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654869510?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></p>
<p></p>
<p>As I managed to get my pen plotter (a nice Roland DXY-1150A) working with gh via <a href="http://music.columbia.edu/cmc/chiplotle/" target="_blank">chiplotle</a> (a also nice library that enables you to talk to the plotter via usb to serial port interface) all I need to be happy is the right sorting algorithm for the curves..</p>
<p></p>
<p>Will post some of the workflow and results later on here on the forum.</p>
<p></p>
<p>The task is to create a scripting component that sorts a given list of curves and lines and also flips them in a way that an xy plotter (or cutter or whatever) will go through them with the shortest walk.</p>
<p></p>
<p><strong>And this time we will also have a price. I will ship a unique generative watercolor plot to the winner. </strong></p>
<p></p>
<p>To determine the winner I will measure the plotting time on my plotter. </p>
<p></p>
<p>----------------------------------------------------------------------------------------</p>
<p></p>
<p></p>
<p>Here are some assumptions I made but of course any other solution is welcome:</p>
<p></p>
<p>In my opinion it should be something like <a href="http://www.grasshopper3d.com/profile/DavidMans" target="_blank">David Mans</a> "<a href="http://neoarchaic.net/2010/05/sort-points-by-distance/" target="_blank">Sequentially Sort Points by Distance Component</a>" for curves.</p>
<p></p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654869856?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654869856?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></p>
<p></p>
<p dir="ltr">pseudo code<span> would be:</span></p>
<p><span><span> </span></span></p>
<p dir="ltr"><span>input: list of curves and lines</span></p>
<p><span><span> </span></span></p>
<ol>
<li dir="ltr"><p dir="ltr"><span>make a list of all endpoints and start points of the given curves</span></p>
</li>
<li dir="ltr"><p dir="ltr"><span>start with a given point</span></p>
</li>
<li dir="ltr"><p dir="ltr"><span>find the closest point regardless of whether its a start point or an endpoint.</span></p>
</li>
<li dir="ltr"><p dir="ltr"><span>delete that point from the list</span></p>
</li>
<li dir="ltr"><p dir="ltr"><span>take the other point of that curve </span></p>
</li>
</ol>
<p dir="ltr"><span>and so on until you reach the end of the list.</span></p>
<p><span><span> </span></span></p>
<p dir="ltr"><span>the curves get sorted sequentially according to pattern above.</span></p>
<p><span><span> </span></span></p>
<p dir="ltr"><span>output would be the sorted indices of the curves and a true/false pattern whether</span></p>
<p dir="ltr"><span>the first picked point was a start point or an endpoint.</span></p>
<p dir="ltr"><span>to be able to flip the curves afterwards...</span></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p> </p> Games for Grasshopper. Open Challenge!tag:www.grasshopper3d.com,2014-09-16:2985220:Topic:11326572014-09-16T23:44:27.114ZDaniel González Abaldehttps://www.grasshopper3d.com/profile/DaniAbalde
<p><span class="font-size-1">Excuse me for my googlenglish and if I do not follow the "doctrines" of the group.</span></p>
<p></p>
<p><span class="font-size-2">Due of the interest for publications of Piker and mine about games with Kangaroo, i think that would be fun and interesting make a challenge of games between all the community. <a href="http://www.grasshopper3d.com/video/racing-game-with-grasshopper" target="_blank">Look here</a>.</span></p>
<p></p>
<p>To all of us like games. There are…</p>
<p><span class="font-size-1">Excuse me for my googlenglish and if I do not follow the "doctrines" of the group.</span></p>
<p></p>
<p><span class="font-size-2">Due of the interest for publications of Piker and mine about games with Kangaroo, i think that would be fun and interesting make a challenge of games between all the community. <a href="http://www.grasshopper3d.com/video/racing-game-with-grasshopper" target="_blank">Look here</a>.</span></p>
<p></p>
<p>To all of us like games. There are many ways to make it, and isn't something that takes a long time. Essentially only need a good idea.</p>
<p></p>
<p>Therefore, if you want to participate, you will be subject to these rules:</p>
<p></p>
<p>1. You must publish the Grasshopper definition, without cluster with passwords. <br/> 2. Can not compete with a file already published. <br/> 3. May judge the whole community, but once finished the date of delivery and they must follow these bonuses:</p>
<p><br/> - Playability. More entertaining, better. </p>
<p>- Originality. Classic, modern or new games adapted to Gh. <br/> - Divergence. Thinking differently, usual components used for other reasons. <br/> - Master. If you learn from its definition, reward it. <br/> - Simplicity. Not necessarily less components, rather a clear logic.</p>
<p>- Smoothness. Should be quick, no need to rent a supercomputer. </p>
<p><br/> The deadline is <span style="text-decoration: underline;">November 30</span>. From 1 to December 15, all we can score / value, with 3, 2 and 1 points to the first, second and third respectively. Who has the highest score on 16, wins the challenge.</p>
<p></p>
<p></p>
<p>Good luck! </p> Decimal to Hextag:www.grasshopper3d.com,2014-08-08:2985220:Topic:11125462014-08-08T19:36:07.375ZBrian Harmshttps://www.grasshopper3d.com/profile/BrianHarms
<p>Playing off of Danny's computer language conversion theme, make a definition that converts any integer up to 65535 (one less than 16^4) to its 4-digit hex equivalent.</p>
<p></p>
<p>Examples:</p>
<p>0 = 0000</p>
<p>1 = 0001</p>
<p>9 = 0009</p>
<p>10 = 000A</p>
<p>16 = 000F</p>
<p>65535 = FFFF</p>
<p></p>
<p>Scripting will obviously be the shortest. I think finding the shortest native def. is more interesting. Mine's 13 components including a slider for input, a panel for output, and a couple…</p>
<p>Playing off of Danny's computer language conversion theme, make a definition that converts any integer up to 65535 (one less than 16^4) to its 4-digit hex equivalent.</p>
<p></p>
<p>Examples:</p>
<p>0 = 0000</p>
<p>1 = 0001</p>
<p>9 = 0009</p>
<p>10 = 000A</p>
<p>16 = 000F</p>
<p>65535 = FFFF</p>
<p></p>
<p>Scripting will obviously be the shortest. I think finding the shortest native def. is more interesting. Mine's 13 components including a slider for input, a panel for output, and a couple other panels to hold pertinent info (I just mean there is data that could be internalized to shave off a couple components, but there is no internalized data in mine).</p>
<p></p>
<p>Best,</p>
<p></p>
<p>Brian</p> [Utilities Series] May 11, 2014 - Panelling machines.tag:www.grasshopper3d.com,2014-05-11:2985220:Topic:10682092014-05-11T19:50:05.500ZÁngel Linareshttps://www.grasshopper3d.com/profile/AngelLinares
<p>As easy as it sounds. David R. proposed some days ago to search for neat and clean solutions for common and simple problems that everybody could understand. I've tagged this c+GH post as "Utilities series", but it could be changed in the future with nicer and more interesting names.</p>
<p></p>
<p>It's perfectly known that lot of plugins has been released to empower GH panelling capabilities, but usually lightweight and native systems could be required to accomplish specific little (or big)…</p>
<p>As easy as it sounds. David R. proposed some days ago to search for neat and clean solutions for common and simple problems that everybody could understand. I've tagged this c+GH post as "Utilities series", but it could be changed in the future with nicer and more interesting names.</p>
<p></p>
<p>It's perfectly known that lot of plugins has been released to empower GH panelling capabilities, but usually lightweight and native systems could be required to accomplish specific little (or big) design tasks. In addition to this, the panelling process is a task that let the user to play and learn and practice deeply concepts about surface/meshes topology, list and data trees management, etc. So I though that this could be a perfect starting point for the "Utilities series" in c+GH.</p>
<p></p>
<p>To open this group of c+GH post I will start with something simple that everyone that have used GH has tried sooner or later in his/her learning process: how to panel a surface using standard/built-in GH components only.</p>
<p></p>
<p><span class="font-size-2">Topics that could be covered (aka, problem categories):</span></p>
<ul>
<li>Planar panels. </li>
<li>Curved panels. </li>
<li>Mixed solutions: curvature/distortion triggers or limits.</li>
</ul>
<p></p>
<p>Given a NURBS surface, create a single panelling system that implement one of the categories described for only one kind of panel (triangular, quadrilateral, n-gon). Of course, curved panels are not compatible with triangular shapes, etc, so try to pick a compatible combination.</p>
<p></p>
<p><span class="font-size-2">Further considerations:</span></p>
<ul>
<li>The implemented solution <span>should let the user to interact with every panel easily</span>, so the proposed algorithm should track the panellization process avoiding to destroy helpful information/data structures for further modifications in the panelling system.</li>
<li><strong>NURBS and mesh solutions are both allowed</strong>.</li>
<li>None, plugin or scripted component allowed.</li>
<li>The cleanest, shorter and less processing-time-expensive solution in every category will be the winner (please, consider using profiler intensively).</li>
<li>Deadline: <span><strong>May 18, 2014</strong>.</span></li>
</ul> May 02, 2014 - 10 Types of peopletag:www.grasshopper3d.com,2014-05-02:2985220:Topic:10629002014-05-02T08:29:13.694ZDanny Boyeshttps://www.grasshopper3d.com/profile/DannyBoyes
<p>Hopefully this is not such a time consuming ghoffee question, but it also acts as a precursor to another one down the line.</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654855744?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654855744?profile=RESIZE_1024x1024" width="750"></img></a></p>
<p>Solutions to be classed by either:</p>
<ul>
<li>Native components only (no scripts or Expressions, trivial I/O <expressions> allowed)</li>
<li>Use of Plug-ins</li>
<li>Code - either VB.NET, C# or Python</li>
</ul>
<p>Winner announced…</p>
<p>Hopefully this is not such a time consuming ghoffee question, but it also acts as a precursor to another one down the line.</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654855744?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654855744?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></p>
<p>Solutions to be classed by either:</p>
<ul>
<li>Native components only (no scripts or Expressions, trivial I/O <expressions> allowed)</li>
<li>Use of Plug-ins</li>
<li>Code - either VB.NET, C# or Python</li>
</ul>
<p>Winner announced this time tomorrow (0830 GMT)</p>
<p></p>
<p>I have to bail now. Tomorrow is Saturday so I won't be able to upload the file then, so if you promise not to cheat and still want to have a go, don't look...</p>
<p></p>
<p>P R E L I M I N A R Y W I N N E R S</p>
<p>=========================</p>
<p>Native: Ángel</p>
<p>Plug-ins: Technically as python is a plug-in still, the winner is Anders as there were no other runners (Yet)</p>
<p>Scripting: Anders gets a Special mention for bringing my attention to bin(x) in python but the award goes to David</p>
<p> </p>
<p>S O L U T I O N</p>
<p>===========</p>
<p>[Image will be posted Monday]</p>
<p>File below</p>
<p></p> watch this space.tag:www.grasshopper3d.com,2014-05-01:2985220:Topic:10631462014-05-01T22:25:57.904ZDanny Boyeshttps://www.grasshopper3d.com/profile/DannyBoyes
<p>With an interest "brewing" in ghoffee again. Unless someone else has something to post i'll try and come up with something for tomorrow.</p>
<p>Similar format, 3 catergories</p>
<p>Native</p>
<p>Plug-in</p>
<p>Code</p>
<p>With an interest "brewing" in ghoffee again. Unless someone else has something to post i'll try and come up with something for tomorrow.</p>
<p>Similar format, 3 catergories</p>
<p>Native</p>
<p>Plug-in</p>
<p>Code</p> Lightning Bolttag:www.grasshopper3d.com,2013-10-24:2985220:Topic:9420692013-10-24T02:54:55.935ZJacobhttps://www.grasshopper3d.com/profile/Jacob
<p><span>Trying to create a lightning bolt for fun with a series of random iterations. Don't know if anyone has already created a script like this, because I have been running into some troubles with how to really visualize this out. Any help or input would be great. …</span></p>
<p><span><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654824231?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654824231?profile=RESIZE_1024x1024" width="750"></img></a></span></p>
<p><span>Trying to create a lightning bolt for fun with a series of random iterations. Don't know if anyone has already created a script like this, because I have been running into some troubles with how to really visualize this out. Any help or input would be great. </span></p>
<p><span><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654824231?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654824231?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></span></p> Happy Rainbow IntCrvtag:www.grasshopper3d.com,2012-08-14:2985220:Topic:6588522012-08-14T09:38:26.362Zphilliphttps://www.grasshopper3d.com/profile/phillip
<p>Hi All,</p>
<p>since nobody has been drinking coffee lately, I am posting what I am playing with, because I guess there are several ways to do it. So my least component solution (10 + 2 to colour) was a geometry-based workaround.</p>
<p>Can you do better?</p>
<p></p>
<p>Task:</p>
<p> Given is a set of points with different stages. The goal is a set of interpolated curves (here 13 per branch) through these points, if the points are within a certain distance to each other.</p>
<p></p>
<p>- If…</p>
<p>Hi All,</p>
<p>since nobody has been drinking coffee lately, I am posting what I am playing with, because I guess there are several ways to do it. So my least component solution (10 + 2 to colour) was a geometry-based workaround.</p>
<p>Can you do better?</p>
<p></p>
<p>Task:</p>
<p> Given is a set of points with different stages. The goal is a set of interpolated curves (here 13 per branch) through these points, if the points are within a certain distance to each other.</p>
<p></p>
<p>- If some of the points are inside the minimum distance you will have several curves (here two per branch) - Stage 00</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654764426?profile=original" target="_self"><img src="http://storage.ning.com/topology/rest/1.0/file/get/2654764426?profile=original" width="478" class="align-full"/></a></p>
<p></p>
<p>-If all are in range, you will have one closed curve per branch</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654764529?profile=original" target="_self"><img src="http://storage.ning.com/topology/rest/1.0/file/get/2654764529?profile=original" width="537" class="align-full"/></a></p>
<p></p>
<p>-If nothing is in range, there are no curves.</p>
<p></p>
<p>Rules:</p>
<p>-Do not use Gate or If </p>
<p>-Following the first rule and still making Stage 00 periodic will give copious amounts of extra points.</p> Divide List Challengetag:www.grasshopper3d.com,2012-06-12:2985220:Topic:6164442012-06-12T19:01:57.192ZLeonardo Nuevo Arenashttps://www.grasshopper3d.com/profile/nuarle
<p>I've got a challenge for the Coffe + Grasshopper comunity: <br></br>can you figure out how to divide a list into shorter equal lists without plugins, scripts or functions?<br></br><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654760464?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654760464?profile=RESIZE_1024x1024" width="750"></img></a> <a href="http://storage.ning.com/topology/rest/1.0/file/get/2654760720?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654760720?profile=RESIZE_1024x1024" width="750"></img></a> 1.- Only native GH components allowed.<br></br><br></br></p>
<p>2.- The number of resulting…</p>
<p>I've got a challenge for the Coffe + Grasshopper comunity: <br/>can you figure out how to divide a list into shorter equal lists without plugins, scripts or functions?<br/><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654760464?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654760464?profile=RESIZE_1024x1024" width="750" class="align-full"/></a><a href="http://storage.ning.com/topology/rest/1.0/file/get/2654760720?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2654760720?profile=RESIZE_1024x1024" width="750" class="align-full"/></a>1.- Only native GH components allowed.<br/><br/></p>
<p>2.- The number of resulting lists must be variable, you should be able to control it via sliders</p>
<p></p>
<p>3.- Your submission must not be clustered, the use of it on this post is to prevent cheating.</p>
<p>[Complex Geometry]<br/><a href="http://www.complexgeometry.com">www.complexgeometry.com</a><br/><a href="http://facebook.com/complexgeometry">http://facebook.com/complexgeometry</a></p> Just a brain teasertag:www.grasshopper3d.com,2012-06-04:2985220:Topic:6110652012-06-04T02:24:46.419ZHannes Löschkehttps://www.grasshopper3d.com/profile/HannesLoeschke
<p>Hey guys,</p>
<p>not much going on around here. So maybe here's one...</p>
<p>I've been trying to wrap my head around it but am kind of stuck. My next step is to write my own component to do it but maybe one of you can solve this thing in native GH.</p>
<p>Here's what I've got: <a href="http://storage.ning.com/topology/rest/1.0/file/get/2654754782?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654754782?profile=RESIZE_1024x1024" width="750"></img></a></p>
<p>Display the wavefronts of a wave reflecting around a given floor plan. Calculate up to the…</p>
<p>Hey guys,</p>
<p>not much going on around here. So maybe here's one...</p>
<p>I've been trying to wrap my head around it but am kind of stuck. My next step is to write my own component to do it but maybe one of you can solve this thing in native GH.</p>
<p>Here's what I've got: <a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/2654754782?profile=original"><img width="750" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2654754782?profile=RESIZE_1024x1024" width="750"/></a></p>
<p>Display the wavefronts of a wave reflecting around a given floor plan. Calculate up to the 4th reflection.</p>
<p>My current solution works in a rectangular room but has some flaws/assumptions that prevent it from solving for an arbitrary plan. So rectangular room is the minimum.</p>
<p></p>
<p>Bonus: do it all in 3D ;)</p>