thing...
any help ?
i have also another question? is there an accurate way for computing the normal vector of a given control point ?
private void RunScript(Surface Srf, int U, int V, int deg, bool swap, ref object A, ref object B, ref object C, ref object D, ref object E)
{
ControlPoint Pt1 = Srf.ToNurbsSurface().Points.GetControlPoint(U, V);
ControlPoint Pt2 = new ControlPoint();
if (swap)
{
Pt2 = Srf.ToNurbsSurface().Points.GetControlPoint(U - 1, V);
}
else
{
Pt2 = Srf.ToNurbsSurface().Points.GetControlPoint(U, V - 1);
}
double u1 = new double();
double v1 = new double();
Plane Fr = new Plane();
Srf.ClosestPoint(new Point3d(Pt2.Location.X, Pt2.Location.Y, Pt2.Location.Z), out u1, out v1);
Srf.FrameAt(u1, v1, out Fr);
Line l1 = new Line(new Point3d(Pt1.Location.X, Pt1.Location.Y, Pt1.Location.Z), new Point3d(Pt2.Location.X, Pt2.Location.Y, Pt2.Location.Z));
Line l2 = new Line(new Point3d(Pt2.Location.X, Pt2.Location.Y, Pt2.Location.Z), Fr.Origin);
Vector3d Ax = Rhino.Geometry.Vector3d.CrossProduct((l1.Direction * -1), (l2.Direction * -1));
Ax.Unitize();
Pt1.Location.Transform(Transform.Rotation(((deg * ( 2 * System.Math.PI)) / 360), Ax, new Point3d(Pt2.Location.X, Pt2.Location.Y, Pt2.Location.Z)));
Srf.ToNurbsSurface().Points.SetControlPoint(U, V, Pt1);
A = Ax;
B = new Point3d(Pt2.Location.X, Pt2.Location.Y, Pt2.Location.Z);
C = Fr;
D = new Point3d(Pt1.Location.X, Pt1.Location.Y, Pt1.Location.Z);
E = Srf;
}
…
izing strength/spring stiffness and even the unit of your 3DM file setting.
sometimes the same pattern that can be planarized in one file would stop working once something else is modified. and sometimes the force can't even planarize one single cell.
I think you can find some idea from the following post:
http://www.grasshopper3d.com/forum/topics/planar-polygons-by-using-kangaroo
'Reply by Daniel Piker on December 17, 2013 at 10:25am
Making the faces of a polygonal mesh planar is not always possible without dramatically changing the shape of either the polygons or the surface.
When the target surface has only positive Gaussian curvature it makes things somewhat easier, but the surface in your file also has regions of negative Gaussian curvature.
To approximate a surface of negative curvature with a discrete mesh, we need the angles around some of the vertices to sum to less than 360°. This is impossible to do in a mesh with 3 hexagons around each vertex without making some of these hexagons non-convex.
There are a few possible approaches, but I would say how to automatically cover an arbitrary surface with nicely shaped planar hexagons is still an unsolved problem.'
I have uploaded some test files for you to look at. …
he process. The last one is there because fixing it would cause another problem, which we feel is more serious. Solutions may well be forthcoming in the future though.
1. Grasshopper curves and points are drawn more towards the camera than they really are. This is a conscious decision. Often Rhino geometry and Grasshopper geometry exist in the same place. If we would draw the Grasshopper preview in place, then there's no telling whether you'd see the Rhino curve or the Grasshopper curve. We feel it's important that you always see the Grasshopper curve on top. This is why we draw all curves and points slightly towards the camera. However we don't do this for meshes. This results in something akin to the image below. The eye represents the location of the viewport camera, the shaded box represents the actual location of the geometry and all the thick black lines represent the edges of the geometry moved towards the camera. As you can see, the red lines will be visible, even though they should be behind the shaded box. This effect can get very strong when the camera is close to some geometry relative to the size of the boundingbox of all geometry.
2. Wires behind the camera are sometimes visible. This is a bug I don't know how to solve. We'll get around to it eventually. When an object is behind the camera the display transform sometimes makes it visible in front of the camera in some weird inverted perspective mode.
3. Meshes are not z-sorted prior to display. This means that the order in which they are drawn is not back-to-front, but fairly arbitrary. This means that a transparent mesh may appear to punch a hole in the mesh behind it. If this is annoying you to no end, you can use Ctrl+F on the Grasshopper components that contain the meshes that are punching holes and then press F5 to recompute. The draw order should now be different. Of course sometimes it will only 'fix' it for a specific camera angle.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
ulting topography, I just wanted it to be reasonably close so it looked appropriate as context. That sort of drives the rest of it (OSM).
Even though the earth is not truly a sphere, I treat it as one for the purposes of calculating distances in Elk. So the first step for both the SRTM and OSM translations is to figure out the length of one degree and use that number against the coordinates to determine the position in the XY plane.
Latitude:
The circumference of a circle is 2πr. The circumference of the earth is about 6371000m so you get about 40 million meters for the circumference. Further convert that to a distance per degree and you get around 111,194m or 364,812'. (PI * EarthRadius) / 180 gives you the degree length in meters and multiplying it by Y was just scaling it to feet. Since circumference is 2πr, another way to write the formula would be (2 * PI * EarthRadius) / 360.
Longitude:
Longitudinal lines converge at the poles so their distance at the equator is the same as latitude (111,194m per degree), but converges to 0 as it gets closer to either pole. Technically this means that the farther away from the equator you go the points should be slightly closer together. I'm just getting an average distance for the points, so I get the median latitude degree in order to determine the radius of the earth sphere at that distance.
Then you subtract the lower end of the domains from the CSV's longitude and latitude, and then multiply the resulting decimal number by the calculated lengths for a degree in longitude and latitude and those numbers are combined to be the X and Y coordinates of the points.
Hope this helps.
-Tim…
of pitch forwards and backwards2. What effect do the following have on the system... a) Angle of Attack (AOA) of the front wing b) AOA of the rear wing c) Position of the mast along the fuselage. d) Position of rider above the mast (distribution of weight between front and rear feet amd position of the mast between the feet).So, in essence I want to model a 2 dimensional system as follows...I would like to incorporate a coefficient of lift versus AOA for the front and rear wings.Data for this can be found in text file format for example here for the Eppler 817 airfoil that I want to use... EPPLER817 DATAI might need more info than this though???Assume constant velocity???Ultimately, the lift generated by the hydrofoil will equal the weight of the rider otherwise you would sink or jump forever upwards but the hydrofoil can generate more lift or less lift than the rider depending on its angle of attack. I could assume the wing can generate -1.0x to 1.5x the weight of the rider in lift?The rear wing is usually approx 1/3 the size of the front wing. So perhaps assume 1/3 of the lift of the front wing although I will probably use a different airfoil section which will have different lift characteristics.Assume the rider can shift weight forwards and backwards between front foot and rear foot to keep the foil level, but perhaps include a time lag or some means of indicating how stable the system is.Ignore the water surface and assume the wings remain submerged.I want to assess the difference between having an AOA on the front wing and no AOA on the rear wing versus no AOA on the front but a AOA that creates a downforce on the rear wing (Which is how they are normally configured I think). I believe the rear wing is alwasy trying to pitch the front wing upwards creating a greater AOA and hence more lift. The rider has to keep pressure on their front foot to stop the front wing stalling and control the lift to be equal to their weight.My aim is to understand what parameters to use for front wing AOA, rear wing AOA and mast position to create a hydrofoil that is stable but not so stable that it takes a lot of effort to pitch it forwards and backwards. So I'm not looking for the most stable configuration, I'm looking to avoid something that is really unstable or requires (for example) the rider to put 100% of weight on one foot!Is it possible to create a meaningful simulation of this with Kangaroo 1 or 2? I made a start... Not sure I've approached it in the right way and haven't attempted to add the coefficient of lift vs AOA feedback.A video of kite hydrofoiling...
More info for those still reading...Kite hydrofoils come in many shapes and sizes... there are high aspect ration wings for racing, low aspect wings for beginners / low speed. There seem to be many configurations of mast position, feet position over the mast, length of fuselage, size of front wing to rear wing etc etc. I'm planning on CNC machining the front wing, fuselage and rear wing in one piece made up from bamboo. Then applying glass fibre or carbon fibre. I already have an aluminium mast and will make a board.…
Added by martyn hogg at 1:52pm on November 14, 2016
0 degrees) and +/- convex/concave sign for a given vertex of a mesh in a Python module in Grasshopper? I can't find Rhinocommon commands to even approach this for meshes instead of surfaces (which require a UV location using the Gaussian command) and even a list of connected vertices I am not sure if they will return in useful circular order around the vertex or just unpredictably, if I have to manually calculate angles one at a time around the vertex.
In fact, using:
print MESH.Vertices.GetConnectedVertices(45)
shows the returned vertex order is *not* in nice cyclic order around the vertex, so I don't know how to even calculate angles manually one at a time lest some pairs not even represent a face corner.
Daniel Piker suggests doing this calculation on a mesh here:
http://www.grasshopper3d.com/forum/topics/curvature-of-mesh
"What if you triangulated the mesh first, then measured the Gaussian curvature (using the angle defect) per vertex?
If there are non-planar quads then it is true that which of the 2 possible triangulations is used will slightly affect the value, but I imagine this would average out over the surrounding vertices."
I certainly don't want to have to remesh my efficient model with extra triangles though.
I display my face and vertex numbers outside of Python, as a guide:
Intuitively, I think I may be able to derive it from the face normals surrounding each vertex since on a flat mesh, they will all be the same normal versus the vertex normal and on a slightly curved mesh they will be slightly angled and on a sharp point vertex they will be highly angled versus the vertex normal.
This is all especially difficult since the Rhinocommon CHM file still has so few Python examples instead of just C# and Visual Basic. Also, how point data must be translated into Python lists manually using .X, .Y and .Z modifiers and sometimes back for me to operate on them.
…
rring to the above image)
Area
effective
effective
Second
Elastic
Elastic
Plastic
Radius
Second
Elastic
Plastic
Radius
of
Vy shear
Vz shear
Moment
Modulus
Modulus
Modulus
of
Moment
Modulus
Modulus
of
Section
Area
Area
of Area
upper
lower
Gyration
of Area
Gyration
(strong axis)
(strong axis)
(strong axis)
(strong axis)
(strong axis)
(weak axis)
(weak axis)
(weak axis)
(weak axis)
A
Ay
Az
Iy
Wy
Wy
Wply
i_y
Iz
Wz
Wplz
i_z
cm2
cm2
cm2
cm4
cm3
cm3
cm3
cm
cm4
cm3
cm3
cm
I have a very similar table which I could import to the Karamba table. But I have i_v or i_u values as well as radius of inertia for instance.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
dimensjon
Masse
Areal
akse
Ix
Wpx
ix
akse
Iy
Wpy
iy
akse
Iv
Wpv
iv
Width
Thickness
Radius R
[kg/m]
[mm2]
[mm4]
[mm3]
[mm]
[mm4]
[mm3]
[mm]
[mm4]
[mm3]
[mm]
[mm]
[mm]
[mm]
L 20x3
0.89
113
x-x
4,000
290
5.9
y-y
4,000
290
5.9
v-v
1,700
200
3.9
20
3
4
L 20x4
1.15
146
x-x
5,000
360
5.8
y-y
5,000
360
5.8
v-v
2,200
240
3.8
20
4
4
L 25x3
1.12
143
x-x
8,200
460
7.6
y-y
8,200
460
7.6
v-v
3,400
330
4.9
25
3
4
L 25x4
1.46
186
x-x
10,300
590
7.4
y-y
10,300
590
7.4
v-v
4,300
400
4.8
25
4
4
L 30x3
1.37
175
x-x
14,600
680
9.1
y-y
14,600
680
9.1
v-v
6,100
510
5.9
30
3
5
L 30x4
1.79
228
x-x
18,400
870
9.0
y-y
18,400
870
9.0
v-v
7,700
620
5.8
30
4
5
L 36x3
1.66
211
x-x
25,800
990
11.1
y-y
25,800
990
11.1
v-v
10,700
760
7.1
36
3
5
L 36x4
2.16
276
x-x
32,900
1,280
10.9
y-y
32,900
1,280
10.9
v-v
13,700
930
7.0
36
4
5
L 36x5
2.65
338
x-x
39,500
1,560
10.8
y-y
39,500
1,560
10.8
v-v
16,500
1,090
7.0
36
5
5
I have diagonals (bracings) which can buckle in these "non-regular" directions too, and they do. If I could add those values then in the Karamba model I could assign specific buckling scenarios..... I can see another challenge which will be at the ModifyElement component, I will not be able to choose these buckling lengths, in these directions.
Do you think this functionality can be added within short, or should I try to find another way to model these members?
Br, Balazs
…
register, please contact Miss Roula Homsi Tel: 06/218400 ext:4007email: r.homsi@bau.edu.lbTOPICS: Parametric design , Algorithms, Kinetic Architecture, responsive facades, interactive design, smart buildings, generative design, NURBS modeling, parametric modeling, architectural design algorithms, form finding algorithms , and Environmental Adaptive Dynamic ArchitectureComputational skills: Rhino3D – Grasshopper 3d – Paneling tools - Kangaroo plugin - fields grasshopper -Digital Fabrication- Arduino micro controllers - lighting and temperature sensors - Firefly plugin - gHowl – mobile controller - Wi-Fi controllersWORKSHOP PROGRAM: PHASE ONE: Day 01- opening lecture on Algorithmic Added Design - tutorials and introductions to NURBS modeling with Rhino 3d- Parametric modeling tutorials with grasshopper 3d- Grasshopper processes, algorithmic logic and data management-Essential mathematical functions and logical operations- Projects assignments, groups divisions, project phase’s scheduleDay 02 - Form finding methods and theories for architecture - Training on physical algorithms using Kangaroo plugin-Catenary systems on curves, Catenary on surfaces, and mesh relaxation- Algorithms and design inspirations- Subdivision algorithms, paneling tools- Responsive materials, structural optimizations- Project phase one submissionDay 03- Envelope pattern optimizations for natural lighting- Kinetic Architecture introduction and projects examples- Responsive material analysis and design systems- Kinetic facades and dynamic pattern - Training on Arduino & preparing digital models for kinetic simulationPHASE TWODay 04- environmental Sensors, design reaction- lighting sensors, temperature sensors-Responsive envelop responsive simulations to sensors.-Smart and embedded systems for Architecture- Architectural models movements and mechanisms Day 05- Wireless controllers for grasshopper- Mobile controllers - Projects final submissionDay 06 -Finalizing students projects,-Models fabrications and sensors installations, documenting reactions-Final project ourcomesFEES for the 2 phases __ fees is 420 $ per participants( 360 for BAU students) Fees includes all teaching materials, software kit, lectures kit, laser cutting, Arduino microcontroller boards, sensors and using equipment. Students need to bring their own laptops, digital equipment and model making tools.PREREQUESTSThis program is open to current international Engineering, architecture and design students, masters, PhD candidates and young architects and professionals. Software Requirements: basic knowledge of 2D and 3D modeling software.…
rotation
A with another displacement and rotation
A B with displacement and rotation
A B with another displacement and rotation
A B C with displacement and rotation
A B C with another displacement and rotation
A B C D with displacement and rotation
A B C D with another displacement and rotation
My problem (I have):
I only get the last polyline curve.
I get :
D with displacement and rotation
D with displacement and rotation
D with displacement and rotation
D with displacement and rotation
Everything seems fine when I look at the resulting curves BEFORE the output. The problem seems at A = curvelist...
There is probably a story with the all the flattens.
I am completely lost lost lost...
°°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°°
Dim curvee As OnCurve
Dim o As New Integer
Dim q As New Integer
Dim anglebase As New Double
Dim vectorr As New On3dVector
Dim curvelist As New List(Of OnCurve)
Dim center As New On3dPoint
center.x = 0
center.y = 0
center.z = 0
o = geometry.Count
q = vector.Count
anglebase = 360 / repetitions
For zzz As Integer = 0 To q / repetitions - 1
For jj As Integer = 0 To repetitions - 1
For oo As Integer = 0 To (p - 1) Mod o
curvee = geometry(oo)
move_rotate(0, anglebase * jj, curvee, center)
curvelist.Add(curve)
Next
Next
Next
A = curvelist
p = p + 1
°°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°°
Here is the code for "move_rotate". It directly comes from :
http://www.grasshopper3d.com/forum/topics/onnurbscurvetransform-method
°°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°° °°°°
Dim p As Integer = 1
Sub move_rotate(ByVal dblZ_amount As Double, ByVal dblRotationAngle As Double, ByVal _
ObjectToMove As OnCurve, ByVal pntCenter As On3dpoint)'As OnNurbsCurve
Dim move_xform As New OnXform
move_xform.Translation(0, 0, dblZ_amount)
Dim vertZ_axis As New On3dVector(0, 0, 1)
Dim rotate_xform As New OnXform
rotate_xform.Rotation(dblRotationAngle, vertZ_axis, pntCENTER)
ObjectToMove.Transform(move_xform)
ObjectToMove.Transform(rotate_xform)
End Sub
…
nts that I have found helpful and will be included in the next release, but you can try them now. They are online at https://github.com/fequalsf/Crystallon/tree/0972066e468f0a7a592ff4e7e88226028dcb029c/V2.1I have been interested in finding ways to save settings for different iterations of a design which can be baked into a rhino file and used again later. These tools I've made are for working with divisions of a surface.The first tool (Divide Surface) is for dividing a single surface using UV parameters and outputting a quad mesh. Simple enough. What makes this powerful is you can use that mesh with the "Morph Between Meshes" tool to create your voxels. So now you can morph between surfaces with the same number of divisions but with different parameters. The other nice thing about meshes is they are simple to work with and can be further modified with other plugins (such as kangaroo). They can be baked, manually edited in rhino and saved as STL or OBJ files to use again later. I will be updating all the tools eventually to output meshes.
The next tools are for creating those divisions. Any of the components that require a parameter input need a range of values from 0-1. The simplest way to do this is with the "Range" component. The default domain is 0-1 so you only need to give it a number of steps.
To make the range non-linear, there's a few components you can use. Graph mapper is the most common tool, but you could also use the gradient tool.
But these can be difficult to work with and quite limiting. Graph mapper has a limited set of graph types to work with (I tend to use Bezier) and the gradient tool makes a steep curve which cannot change. Also making small changes is difficult and saving a setting for later is not easy.
So the next tool I made is a curve plotter. This takes your range of number (X values) and your remapped numbers (Y values) and plots the points to either a polyline or interpolated curve. This way you can see the curve the gradient is making or bake out a graph mapper curve you want to use later.
The next tool I made is a curve graph mapper, so you can map numbers using any curve drawn on the XY plane. This gives you much more freedom than the graph mapper and is easier to make small adjustments. Then you can always make many iterations of a curve and go back to any of them saved in the rhino file. There are options to view tags with the values on the curve as well as a gradient preview.
If you take a look at the curve created by the gradient tool, you can see it is basically creating a Bezier curve from the handles on the gradient (position is X value, color is Y value). The problem with using it for division parameters is the tangency of the points is always in the X direction creating a nearly horizontal section in the curve. This will give you a series of the same values, which we don't want. The falloff of the curve is also quite steep with no way of adjusting it.
If you make a lot of divisions you will also notice stepping in the curve. This is because the gradient uses RGB colors which is only a range of whole number from 0-255. So you only have a total of 256 values from 0-1.
Yet there is something elegant and user friendly about Bezier curves which makes them nice for creating gradients. So the last tool I made is for creating a Bezier curve from points. All you need to do is input at least 2 points. The second input is the tangent length multiplier (which can be one value for all or one per span of the curve) and the third is the tangent rotation in radians (also either one value or one per span).
The values are shown on the curve and can be baked as text tags if you want to save them and use the same points and values later. Or you can just bake out the curve. This makes for a simple smooth curve that makes a nice gradient.
…