what I really want to create is to simplify the triangular planes into quads, without giving a U-V grid. To put it in another way, the ideal quad mesh produced should already suggest a U-V grid.
I also recognize that if we just combine triangles (or remove diagonals), the resultant quad may not be planar. I envision that it may require some sort of relaxation by optimizing the position of the nodes (either just along Z, or all 3 axis) to create planar quads.
I look forward to your thoughts.
best,
otto
…
point is appended to the output list; else the point is discarded.
3. from the remaining points create a patch surface that represents the terrain.
For the first two steps, it seems I have to create two "for" loops, first loop through each point, then for each point, select the adjacent points to check if the point is too far off from its neighbors.
My company's computer is rather old and I don't want to spend too much time running such script just to create a terrain.
The data that I have now contain some points measured on existing buildings/overpass etc., so I need to filter out these points and create the terrain surface.
Is there any quicker way to achieve the same goal without having to loop through the list so many times?…
de modelación en 3D y aprovechen las ventajas que plantean, como mejorar su proceso de diseño y explorar múltiples alternativas para un proyecto en lapsos de tiempo muy reducidos en comparación de los métodos tradicionales.
En consecuencia, los alumnos tendrán la posibilidad de disminuir sus tiempos de trabajo, con resultados iguales o incluso mejores a los que obtenían con anterioridad; mejorar la calidad de sus presentaciones y, lo que es más importante, ampliar la fundamentación de sus proyectos en el aspecto funcional y formal, dependiendo de las características del proyecto.
Para lograr estos objetivos, se contemplan dos temarios y un ejercicio práctico.
Al finalizar el curso, los asistentes serán capaces de manejar Rhinoceros y Grasshopper en un nivel medio, con el objetivo que el alumno pueda continuar aprendiendo con alguno de nuestros siguientes workshops o de manera autodidacta.
Además del contenido teórico se incluye un ejercicio práctico, la magnitud del ejercicio y el material que se le destine se definirán con base en el número de asistentes.
El workshop tiene una duración de cinco sesiones:
Sesión 1 – Temario de Rhinoceros
Sesión 2 y 3 – Temario de Grasshopper
Sesión 4 y 5 – Ejercicio práctico
El horario es de 9 am a 4 pm, con una hora de receso para tomar un refrigerio.
No es necesario traer el equipo necesario para trabajar, se cuenta con un equipo para cada persona asi como el material de trabajo para el ejercicio práctico, por lo cual se les recomienda que no traigan portátiles u otro material, únicamente dispositivos de almacenamiento si desean guardar sus trabajos.
El costo del evento es de $3,500 estudiantes y $4,000 profesionales.
(Para poder tener el descuento de estudiante es necesaria una constancia de la universidad de la que proviene, acreditando que el interesado está cursando algún semestre de la carrera. Personas graduadas que estén cursando una maestría o algún grado superior no reciben el descuento).
Para apartar su lugar pueden realizar un depósito de $1,500 y terminar de efectuar el pago antes del 15 de abril si es mediante un depósito bancario o el primer día del evento en efectivo.
El evento se realizará en las oficinas de Vegasot, ubicadas en Circuito Cirujanos No. 23-A
Cd. Satélite, Naucalpan, Edo. de México 53100
http://www.vegasoft.com.mx
Para cualquier duda por favor escriban un correo a luzytextura@gmail.com, por teléfono al 044 55 4381 3302, o en facebook.com/archbernardorivera…
ike using something like the Z vector, but technically you can use any vector you want. This vector will actually determine the static rotatation of all the planes, so you can control that here if you like. One important thing that I've noticed is that the closer the vector is to the plane of the curve or if its too similar to one of the tangent vectors, the more likely you'll have "flipping"
2) Take the cross product between the tangent and the static vector. This will be your first perpendicular vector, which you can use for the X component of the plane.
3) Take the cross product between the tangent and the result of the previous cross product. Use this result as the Y component of the plane. All three components (X, Y, and Z (which is the tangent vector)) are all perpendicular to each other now.
After you've done that you should have planes that decrease twisting. If your curve is not planar, then there will always be some twisting in the frames, but it will be minimal enough to use them effectively.
There also may be "flipping" within the frames, which means one (or both) of two things. First, you could have planes that have reversed their vectors, so the X vector is properly oriented, but pointing down when it should be pointing up. Second, the X and Y vectors could have potentially swapped, so that Y "should" be X and X "should" be Y. In order to check these things, you'll need to do a few tests. The first one is find out whether the vector (X or Y) of the plane your testing is pointing in the opposite direction of previous vector. The second test is to find out whether the vector (X or Y) of the plane your testing is perpendicular to the previous vector. In both cases, an angle test between the two vectors will be able to tell you what you need to know, but you will likely NEVER get exactly 180 for an opposite test or 90 for a perpendicular test. That means that you have to choose a range with which to determine that a given vector is opposite or perpendicular.
You should start testing the X vector to see if anything is wrong. If you find that the X vector is fine, then just move on because Rhino will only allow you to create right handed planes, and the Z vector (the tangent) will always be the same.
I don't believe that there's a native function within the old dotNET SDK for calculating angles, so use the example at the link below. It basically takes the arcCosine of the Dot Product of the two vectors your testing to return the angle in Radians. I'm not sure if this function is included in RhinoCommon or not....
http://wiki.mcneel.com/developer/sdksamples/anglebetweenvectors…
ed cubics. Only geometrical information i found was on the wikipedia page above.
Grid spacing with ribs of unit length is 1+(1.5*2^0.5) = 3.12 in xyz for the cantitruncated, with alternating grid points used for the different modules (that's why i only use odd numbers of grid points in the GH definition) and a second grid shifted in the three directions with half of the grid spacing.
Second system has the same grid spacing in x and y (not alternating though) and 3 as Z spacing.
The Cartesian coordinate system for the different solids:
Cantitruncated:
http://en.wikipedia.org/wiki/Truncated_cube (±ξ, ±1, ±1), (±1, ±ξ, ±1), (±1, ±1, ±ξ) where ξ = \sqrt2 - 1
http://en.wikipedia.org/wiki/Truncated_cuboctahedron (±1, ±(1+√2), ±(1+√8))
http://en.wikipedia.org/wiki/Truncated_tetrahedron permutations of (±1,±1,±3) with an even number of minus signs
Truncated:
http://en.wikipedia.org/wiki/Cuboctahedron (±1,±1,0) (±1,0,±1) (0,±1,±1)
http://en.wikipedia.org/wiki/Truncated_octahedron All permutations of (0, ±1, ±2)
http://en.wikipedia.org/wiki/Truncated_tetrahedron see above
cheers,
pitrak…
I wanted to ask You if there is a way to use an image sampler with a greyscale image (where black would be type 1, grey type 2 and white type 3) or just by writing down which type to use on which "floor" in series by adding the right component?
This is a diagram showing what I want to achieve:
I managed to make the geometry to stack upon one another without overlapping, but all copies in Z axis are the same height of one type.
Any ideas on how to achieve this?
I'm adding the script in the attachment.
Any suggestions are more than welcome,
Thank You…
guess this is just a rectangle you are starting with and, if I read your intentions correctly, you want to start with a box and be able to move its top vertices independently in x,y and z and also rotate them altogether (this seems a bit unnecessary since you already control each vertex independently but ok).
Starting from the beginning of your definition: You don't need to actually create the brep and then extract the vertices and move them and then re-create it. Instead you can just get the bottom vertices from the [Boundary curve], using [Discontinuity] and move them by a vectorZ equal to [Building Height]:
Next you want to create four vectors and move the four vertices. The only thing that could help reduce components here is to merge the four vectors into one list (since you already have the vertices in a list):
Then you can add the rotation just like you did in your definition:
and finally you can create the twisted box. At this point you have 2 lists of 4 points each. Like you did in your definition, you have to use a [List Item] component to get each vertex but instead of using 4 components you can use just one and create more outputs by zooming in and clicking the (+) icon at the bottom:
and you finally have this:
Hope this helps
ps. the reason you were getting 3 breps is because you were creating 3 seperate vectors (x,y,z) instead of one, so you were actually moving each vertex 3 times.
…
hich are integers between 0 and 255 each) to XYZ which could be any floating point values, is as follows:
Dim factor As Double = 1.0 / 127.5 x = (colour.R * factor) - 1.0 y = (colour.G * factor) - 1.0 z = (colour.B * factor) - 1.0
So if a colour channel has the lowest value of 0, the corresponding coordinate will be -1.0. If the channel has the highest value of 255, the coordinate will be +1.0. In the case of [255,161,161] it does:
Dim factor As Double = 1.0 / 127.5x = (255 * factor) - 1.0 which equals 1.0y = (161 * factor) - 1.0 which equals 0.262745 (rounded to 6 decimal places)z = (161 * factor) - 1.0 which equals 0.262745
So the length of the vector with these xyz coordinates is:
SquareRoot of (1.0² + 0.262745² + 0.262745²) which equals 1.066803 (rounded again)
It also follows the largest possible length of a vector created this way is the Square root of 3, which roughly equals 1.732050
This conversion works both ways incidentally, so as long as you convert unitized vectors into colours you'll always get a non-clipped result.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
…
() Sub Main()
' user input
Dim intHowManyTrees : intHowManyTrees = Rhino.GetInteger("how many trees is a forest",20,1,50) Dim intHowManyGenerations : intHowManyGenerations = Rhino.GetInteger("how many generations is a tree?",6,1,10) Dim dblForestLength : dblForestLength = Rhino.GetReal("was is the desired length of your forest",50) Dim dblForestWidth : dblForestWidth = Rhino.GetReal("was is the desired width of your forest",50) Dim dblInitLength : dblInitLength = Rhino.GetReal("was is the desired length of the first main Branch?",10) Dim ang : ang = Rhino.GetReal("angle of rotation", 30, 1, 180) Dim scale : scale = Rhino.GetReal("scale of branch", 0.9) 'loop for number of generations i 'ReDim arrgenerations (Ubound (intHowManyGenerations)) Dim layer_0 : layer_0 = Rhino.AddLayer("0") Dim i For i=0 To intHowManyTrees Dim arrSeed : arrSeed = Array(Rnd*dblForestLength, Rnd*dblForestWidth,0) Dim strLine : strLine = Rhino.AddLine(Array (arrSeed(0), arrSeed (1), arrSeed (2)+Rnd*3), Array(arrSeed(0), arrSeed(1),arrSeed(2)+Rnd*dblInitLength+3))
Call Rhino.ObjectLayer (strLine, "0" ) Call Rhino.ObjectName (strLine, i) Next Dim j,vec ReDim arrbranch (intHowManyGenerations) For i=1 To intHowManyGenerations 'select the elements arrbranch (i) = Rhino.ObjectsByLayer (i-1) Dim strBranch For j=0 To Ubound(arrBranch(i)) strBranch = arrBranch(i)(j) Dim strParentName : strParentName = Rhino.ObjectName(strBranch) ' get start and end points Dim arrStartPt : arrStartPt = Rhino.CurveStartPoint(strBranch) Dim arrEndPt : arrEndPt = Rhino.CurveEndPoint(strBranch)
' get a vector between start and end vec = Rhino.VectorCreate(arrEndPt, arrStartPt) ''''' vec(x,y,z)
' scale vector vec = Rhino.VectorScale(vec, scale)
' rotate vectors Dim arrPlane : arrPlane = Rhino.CurvePerpFrame (strBranch, Rhino.CurveDomain(strBranch)(1))
Dim arrRotAxis Dim layer layer = Rhino.AddLayer ( i )
arrRotAxis = arrPlane(Int(Rnd*3)) Dim vec1 : vec1 = Rhino.VectorRotate(vec, ang, arrRotAxis) ' add the vector to the end point Dim newEndPt : newEndPt = Rhino.VectorAdd(arrEndPt, vec1)
Dim line1: line1 = Rhino.AddLine(arrEndPt, newEndPt) Call Rhino.ObjectLayer (line1, i) Call Rhino.ObjectName(line1, strParentName)
If rnd<0.8 Then arrRotAxis = arrPlane(Int(Rnd*3)) Dim vec2 : vec2 = Rhino.VectorRotate(vec, -ang, arrRotAxis) Dim newEndPt2 : newEndPt2 = Rhino.VectorAdd(arrEndPt, vec2)
Dim line2: line2 = Rhino.AddLine(arrEndPt, newEndPt2) Call Rhino.ObjectLayer (line2, i) Call Rhino.ObjectName(line2, strParentName) End If
If rnd<0.2 Then arrRotAxis = arrPlane(Int(Rnd*3)) Dim vec3 : vec3 = Rhino.VectorRotate(vec, ang*(rnd-0.5)*2, arrRotAxis) Dim newEndPt3 : newEndPt3 = Rhino.VectorAdd(arrEndPt, vec3)
Dim line3: line3 = Rhino.AddLine(arrEndPt, newEndPt3) Call Rhino.ObjectLayer (line3, i) Call Rhino.ObjectName(line3, strParentName) End If Next Next End Sub
Any kind of help would be highly appreciated…
in some areas than others. When a curve is more dense, a certain parameter interval will be shorter.
Curve parameters are not good substitutes for physical distance.
Allow me to demonstrate with a curve type you're probably very familiar with; the Sine curve:
The Sine wave is defined by a single Parameter (just like nurbs curves), except we usually call it "x" rather than "t", but there's really no difference. For every x, this curve gives you a value of y. Nurbs curves give you 3 values for every t (x, y & z), so they're a bit harder to wrap your head around, but the principle behind them is the same.
Let's take a look at two intervals along the Sine wave {A; B}, both of which have the same parameter length. Yet the length of the actual sine wave portions differs greatly, almost by a factor of 2. This is the exact same effect.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…