e. Mutation at present simply replaces the gene with a new random (normalised) value. In future I should implement polynomial mutation or similar, but to be honest I have been trying to keep things as simple as possible. Selection is roulette wheel for both artificial and performance based methods.
There is no crossover at all. Indeed, crossover has been shown to be somewhat ineffective for interactive evolution (in general cases), although I don't have the reference to hand (note: If you use Biomorpher with Embryo, things are a little different as cross-over in the definition can be caused by a single point mutation in the genotype, but let's not go there here).
Clustering algorithm is K-means++. The cluster centroid is actually the closest member of the population to the true centroid. We may change this in future, so that the centroid itself can be a new design, but not yet. Google 'Cluster-Orientated Genetic Algorithms' for more info, and a couple of papers written in 2004 I believe.
No publication as yet. We are planning something though after a couple of upcoming workshops. It will be based on mixed-mode evolution (objective function with artificial selection in the same run). Will post something when I get round to writing something!
Nice to hear you are using biomorpher, what do you plan to use it for in the end?
Thanks,
John.…
rmation?" I know that this can already be accomplished using the brilliant Kangaroo plugin, but I wanted a simpler and faster (yet still accurate) single component that could replicate this unique curve using a variety of inputs: the length of the rod/wire, the width/distance between the endpoints, the height of the bend, and the tangent angle at the start. I also wanted make the unknowns (such as height if only length and width are known) easily accessible for plugging into additional components.
The resulting script, being an all-in-one solution, is somewhat unwieldy, but it could easily be broken down into smaller components (custom .gha's which I don't have the ability to code). If someone wants to tackle this, please do! I'm not an expert coder by any means, and as this was only my second time diving into Grasshopper scripting, if the script seems somewhat strange, that's probably why. I did try to comment the code pretty well though. Here's the full description:
--------------------------------------------------
DESCRIPTION: This beast creates the so-called 'elastica curve', the shape a long, thin rod or wire makes when it is bent elastically (i.e. not permanently). In this case, force is assumed to only be applied horizontally (which would be in line with the rod at rest) and both ends are assumed to be pinned or hinged meaning they are free to rotate (as opposed to clamped, when the end tangent angle is fixed, usually horizontally). An interesting finding is that it doesn't matter what the material or cross-sectional area is, as long as they're uniform along the entire length. Everything makes the same shape when bent as long as it doesn't cross the threshold from elastic to plastic (permanent) deformation (I don't bother to find that limit here, but can be found if the yield stress for a material is known).
Key to the formulas used in this script are elliptic integrals, specifically K(m), the complete elliptic integral of the first kind, and E(m), the complete elliptic integral of the second kind. There was a lot of confusion over the 'm' and 'k' parameters for these functions, as some people use them interchangeably, but they are not the same. m = k^2 (thus k = Sqrt(m)). I try to use the 'm' parameter exclusively to avoid this confusion. Note that there is a unique 'm' parameter for every configuration/shape of the elastica curve.
This script tries to find that unique 'm' parameter based on the inputs. The algorithm starts with a test version of m, evaluates an expression, say 2*E(m)/K(m)-1, then compares the result to what it should be (in this case, a known width/length ratio). Iterate until the correct m is found. Once we have m, we can then calculate all of the other unknowns, then find points that lie on that curve, then interpolate those points for the actual curve. You can also use Wolfram|Alpha as I did to find the m parameter based on the equations in this script (example here: http://tiny.cc/t4tpbx for when say width=45.2 and length=67.1).
Other notes:
* This script works with negative values for width, which will creat a self-intersecting curve (as it should). The curvature of the elastica starts to break down around m=0.95 (~154°), but this script will continue to work until M_MAX, m=0.993 (~169°). If you wish to ignore self-intersecting curves, set ignoreSelfIntersecting to True
* When the only known values are length and height, it is actually possible for certain ratios of height to length to have two valid m values (thus 2 possible widths and angles). This script will return them both.
* Only the first two valid parameters (of the required ones) will be used, meaning if all four are connected (length, width or a PtB, height, and angle), this script will only use length and width (or a PtB).
* Depending on the magnitude of your inputs (say if they're really small, like if length < 10), you might have to increase the constant ROUNDTO at the bottom
REFERENCES: {1} "The elastic rod" by M.E. Pacheco Q. & E. Pina, http://www.scielo.org.mx/pdf/rmfe/v53n2/v53n2a8.pdf {2} "An experiment in nonlinear beam theory" by A. Valiente, http://www.deepdyve.com/lp/doc/I3lwnxdfGz {3} "Snap buckling, writhing and Loop formation In twisted rods" by V.G.A. GOSS, http://myweb.lsbu.ac.uk/~gossga/thesisFinal.pdf {4} "Theory of Elastic Stability" by Stephen Timoshenko, http://www.scribd.com/doc/50402462/Timoshenko-Theory-of-Elastic-Stability (start on p. 76)
INPUT: PtA - First anchor point (required) PtB - Second anchor point (optional, though 2 out of the 4--length, width, height, angle--need to be specified) [note that PtB can be the same as PtA (meaning width would be zero)] [also note that if a different width is additionally specified that's not equal to the distance between PtA and PtB, then the end point will not equal PtB anymore] Pln - Plane of the bent rod/wire, which bends up in the +y direction. The line between PtA and PtB (if specified) must be parallel to the x-axis of this plane
** 2 of the following 4 need to be specified ** Len - Length of the rod/wire, which needs to be > 0 Wid - Width between the endpoints of the curve [note: if PtB is specified in addition, and distance between PtA and PtB <> width, the end point will be relocated Ht - Height of the bent rod/wire (when negative, curve will bend downward, relative to the input plane, instead) Ang - Inner departure angle or tangent angle (in radians) at the ends of the bent rod/wire. Set up so as width approaches length (thus height approaches zero), angle approaches zero
* Following variables only needed for optional calculating of bending force, not for shape of curve. E - Young's modulus (modulus of elasticity) in GPa (=N/m^2) (material-specific. for example, 7075 aluminum is roughly 71.7 GPa) I - Second moment of area (or area moment of inertia) in m^4 (cross-section-specific. for example, a hollow rod would have I = pi * (outer_diameter^4 - inner_diameter^4) / 32 Note: E*I is also known as flexural rigidity or bending stiffness
OUTPUT: out - only for debugging messages Pts - the list of points that approximate the shape of the elastica Crv - the 3rd-degree curve interpolated from those points (with accurate start & end tangents) L - the length of the rod/wire W - the distance (width) between the endpoints of the rod/wire H - the height of the bent rod/wire A - the tangent angle at the (start) end of the rod/wire F - the force needed to hold the rod/wire in a specific shape (based on the material properties & cross-section) **be sure your units for 'I' match your units for the rest of your inputs (length, width, etc.). Also note that the critical buckling load (force) that makes the rod/wire start to bend can be found at height=0
THANKS TO: Mårten Nettelbladt (thegeometryofbending.blogspot.com) Daniel Piker (Kangaroo plugin) David Rutten (Grasshopper guru) Euler & Bernoulli (the O.G.'s)
--------------------------------------------------
Edit: More on the math behind this here.
Cheers,
Will
…
Added by Will McElwain at 4:08pm on February 26, 2014
cy of design communication and the control of information-flow are as important as the creativity of ideas. In response to the concurrent digital evolution emerging in the architectural industry world-wide, the Faculty of Architecture at The University of Hong Kong will host a two week intensive summer program named Digital Practice.Led by professors from The University of Hong Kong, as well as invited practitioners with expertise in practice of cutting edge digital techniques, the program offers participants opportunities to experience applications of computational tools during different stages of an architectural project, i.e. concept design, form finding and optimization, delivery, management and communication of design information under the team-based working environment. By learning advanced computational techniques through case studies in the context of Hong Kong, participants are expected to go beyond the conventional perception of technology, considering users and tools as a feedback-based entity instead of a dichotomy. The program, which is taught in English, includes a series of evening lectures related delivered by teaching staff and invited local architects.對於高品質的建築專案,創意之外,專案過程中高效的設計資訊管理和交流成為項目設計深化和實施必不可少的環節。今天,數字化技術不但改變了建築師的繪圖工具,影響了設計的過程,而且提供了工程建造和管理實施的更有效、更高效的手段。針對建築的數位化演進,香港大學建築學院將於2011年暑假期間,在香港大學建築學院舉辦“數位化實踐”國際研習班。在香港大學建築學院教授及有著相關豐富經驗的外聘實踐建築師的指導下,學員將有機會體驗在專案的不同階段(如概念設計、設計形式的生成、優化,設計資訊的管理和交流),如何有效地應用各種運算智慧化技術(從設計的數位化生成和建築資訊類比到物理模型),提升設計實施的品質,增加設計團隊對於方案的控制。我們將挑戰對於“技術”的傳統認知,即相對於使用者它不僅是工具,更是與使用者互動的媒介,二者形成一個有機的合體。研習班期間會安排系列講座,展現數位化技術在實踐工程中的廣泛應用。…
hit Commit.
I'm wondering how hard it would be to have an edit box which shows the
number the user could click inside of then type in a new number, then
hit enter. :)
2) How would I go about using one line from a table and assign each
field to a variable? Then, move a slider or something and use the values
from the next row?
background: I'm recreating elbows, Tees, and other fittings using
paramatric scripts, then baking and exporting them. Here's one source
table, http://www.wardfittings.com/Assets/PDFs/0902CatalogColorOld.pdf
page 5, the uniform elbows.
Current Setup: the attached ghx file. Create a point at 0,5,0 in a blank
document with units set to inches, then assign that point to the top
left 'Center Pnt' in the ghx file.
Current workflow:
a) Modify variables A, B, H, and Nominal Dia to match one line from the
table in the linked PDF file, page 5, table of regular elbows.
b) Select the 'Nodes' and 'Surfaces' with a drag box
c) Click 'Bake'
d) Switch to Rhino window, do the 'sellast' command.
e) Drag baked objects along Y axis so the center point is at 0,0,0
f) Run 'Join'
g) Run 'Cap'
h) set the 'node' points to a layer called 'nodes'
i) set the surface to a layer called 'fit-3d'.
j) select the surfaces and nodes
k) export selected
This elbow that I'm doing only has 12 rows, so doing it the above method
doesn't take THAT long. I'm also going to be doing a couple with larger
tables like the Tee on page 8, and in other spec files. As you can
imagine, entering in EACH value into a slider is a bit tedious.
I'd love to take the pdf table, run it through an OCR program to convert
to excel, modify the headers so the ghx script knows what they are, then
paste it into grasshopper, or save it and have grasshopper read it, and
I be able to move a slider or something to to select one line at a time.
Has anyone done something similar? ie: assigned one row in a table to a
predefined set of variables, each variable coming from one field in the row?
Thanks for taking the time to read this message. :)
I'm making a rhino script to do steps d-k, so that part will be much faster.
-Suthern…
rof Sigrid Adriaenssen's dissertation that you might find helpful.
The basic idea is for the system in the attached jpg, the equilibrium is P-Ky=0. P is load, K is stiffness and y is displacement/nodal locations, usual Finite Elements stuff. DR models this dynamically so that P - Ky = Fictional Mass x Acceleration + Artificial Damping Coefficient x Velocity. When the right hand side (the Residual Force) of this equation = 0, vibrations have stopped and the corresponding y values represent the equilibrium position.
You iterate by
1) Starting from some y (the initial geometry),
2) Calculate P-Ky by summing all internal forces(prestress) + external applied loads
3) If P - Ky=0, terminate,
4) Calculate velocity and acceleration [you don't really need to know the details of this bit unless you are coding up an algorithm..Sigrid's paper explains it anyways]
5) Find new y based on the given time step and repeat from step 2, first resetting the velocities and accelerations to zero
There are some other specifics, but in plain words this the general idea: apply external forces, calculate the displacement, velocity and acceleration, reset these to zero, reapply external force, recalculate displacement, velocity and acceleration, etc until system has stopped displacing under external force application. Sam Joyce has posted some source code in Processing if you want to see how to program it. http://people.bath.ac.uk/scj21/…
iew mode:
instead of the fabrication mode (individual Breps ready for 3d printing - minus "some" little details with regard their effortless connection > this is what V3 does):
2. GH does not (AFAIK) include the mesh.Offset capability (used a little C# for that).
3. I promise to translate the test C# used into native components ... if the result is what you are after (you never know, he he).
4. Rounding (fillet) the thickened panel lips (around the hole and with regard perimeter panels) is doable but only via code: AFAIK GH does not include the Surface.CreateRollingBallFillet method (something that does fillets, that is - forget it for the moment). In fact ... there's a complex way to do it without that method ... but is not for the moment (next week you'll be 100% more experienced, he he).…
alues that represent the unit normal vector at the X, Y, and Z point. There will also be other values such as feed rate, spindle RPM, or other values dependent on the machine type.
There are 2 types of X, Y, and Z values: incremental and absolute. Sometimes the CNC code will tell you which it is using, but sometimes not. Again, it depends on the machine type for which the CNC code is produced, and also on the software that produces the code.
Here is some code for my 3D printer.
G0 X54.010 Y-44.505 F7500G0 F7200 E-3.5000G1 X54.010 Y-11.884 E-2.5235 F6000G1 X20.010 Y-11.884 E-1.5057G1 X20.010 Y-45.884 E-0.4880G1 X54.010 Y-45.884 E0.5298
G0 and G1 mean "goto" and tell the printer to move the printhead to the indicated X, Y position. The printhead stays at the zame Z-value until it moves to the next higher layer. E tells the printer to extrude the length of filament following the E. F is the feedrate - the speed for moving the printhead.
Note that 3D printers are an especially simple type of CNC machine, so if you are dealing with code for, say, a 5-axis milling machine, the CNC code will be much more complex. Also, note that most CNC machines move only in straight lines, so if you are dealing with curved surfaces you will have lots of fairly close together goto points.…
erature is measured i.e tempMeasureHeight on Dragonfly_Reference EPW Parameters component.
As for calculating the Reference height, where are you getting the "common sizing rule of 'twice the top building height'"? I can't find that rule anywhere... I think keeping the default value of 150m as the component advises would be better.
Something that helped me a lot, and I think will be of interest to you is this thesis:https://dspace.mit.edu/handle/1721.1/99251?show=full. Specifically, chapter 4 has a set of sensitivity analysis for UWG input parameters, which shows you the % impact of varying the various parameters in terms of heating/cooling energy, and temperature change. In general, it found that varying the meteorological parameters (like the boundary layer inputs) deviated simulated temperature less then 0.5 K, for less then 43 hours of the year from the original empirical measurement. Which is why the study concludes its safe to keep the meterological inputs to default values.
An important caveat here is that the Reference height, is a slight exception to this as it had an effect on Boston temperatures beyond that limit (pg 43). That being said, I spent some time trying to figure out how the 150m value was calculated, and as far as I can tell, its based on an atmospheric simulation model, referenced in Bueno's thesis. So unless you have access to your own vertical temperature dataset, I think keeping the meterological values as they are is a good rule of thumb.
S…