t file** - ply file with just x,y,z locations. I got it from a 3d scanner. Here is how first few lines of file looks like - ply format ascii 1.0 comment VCGLIB generated element vertex 6183 property float x property float y property float z end_header -32.3271 -43.9859 11.5124 -32.0631 -43.983 11.4945 12.9266 -44.4913 28.2031 13.1701 -44.4918 28.2568 13.4138 -44.4892 28.2531 13.6581 -44.4834 28.1941 13.9012 -44.4851 28.2684 ... ... ... In case you need the data - please email me on **nisha.m234@gmail.com**. **Algorithm:** I am trying to find principal curvatures for extracting the ridges and valleys. The steps I am following is: 1. Take a point x 2. Find its k nearest neighbors. I used k from 3 to 20. 3. average the k nearest neighbors => gives (_x, _y, _z) 4. compute covariance matrix 5. Now I take eigen values and eigen vectors of this covariance matrix 6. I get u, v and n here from eigen vectors. u is a vector corresponding to largest eigen value v corresponding to 2nd largest n is 3rd smallest vector corresponding to smallest eigen value 7. Then for transforming the point(x,y,z) I compute matrix T T = [ui ] [u ] [x - _x] [vi ] = [v ] x [y - _y] [ni ] [n ] [z - _z] 8. for each i of the k nearest neighbors:<br> [ n1 ] [u1*u1 u1*v1 v1*v1] [ a ]<br> [ n2 ] = [u2*u2 u2*v2 v2*v2] [ b ] <br> [... ] [ ... ... ... ] [ c ] <br> [ nk ] [uk*uk uk*vk vk*vk]<br> Solve this for a, b and c with least squares 9. this equations will give me a,b,c 10. now I compute eigen values of matrix [a b b a ] 11. This will give me 2 eigen values. one is Kmin and another Kmax. **My Problem:** The output is no where close to finding the correct Ridges and Valleys. I am totally Stuck and frustrated. I am not sure where exactly I am getting it wrong. I think the normal's are not computed correctly. But I am not sure. I am very new to graphics programming and so this maths, normals, shaders go way above my head. Any help will be appreciated. **PLEASE PLEASE HELP!!** **Resources:** I am using Visual Studio 2010 + Eigen Library + ANN Library. **Other Options used** I tried using MeshLab. I used ball pivoting triangles remeshing in MeshLab and then applied the polkadot3d shader. If correctly identifies the ridges and valleys. But I am not able to code it. **My Function:** //the function outputs to ply file void getEigen() { int nPts; // actual number of data points ANNpointArray dataPts; // data points ANNpoint queryPt; // query point ANNidxArray nnIdx;// near neighbor indices ANNdistArray dists; // near neighbor distances ANNkd_tree* kdTree; // search structure //for k = 25 and esp = 2, seems to got few ridges queryPt = annAllocPt(dim); // allocate query point dataPts = annAllocPts(maxPts, dim); // allocate data points nnIdx = new ANNidx[k]; // allocate near neigh indices dists = new ANNdist[k]; // allocate near neighbor dists nPts = 0; // read data points ifstream dataStream; dataStream.open(inputFile, ios::in);// open data file dataIn = &dataStream; ifstream queryStream; queryStream.open("input/query.
pts", ios::in);// open data file queryIn = &queryStream; while (nPts < maxPts && readPt(*dataIn, dataPts[nPts])) nPts++; kdTree = new ANNkd_tree( // build search structure dataPts, // the data points nPts, // number of points dim); // dimension of space while (readPt(*queryIn, queryPt)) // read query points { kdTree->annkSearch( // search queryPt, // query point k, // number of near neighbors nnIdx, // nearest neighbors (returned) dists, // distance (returned) eps); // error bound double x = queryPt[0]; double y = queryPt[1]; double z = queryPt[2]; double _x = 0.0; double _y = 0.0; double _z = 0.0; #pragma region Compute covariance matrix for (int i = 0; i < k; i++) { _x += dataPts[nnIdx[i]][0]; _y += dataPts[nnIdx[i]][1]; _z += dataPts[nnIdx[i]][2]; } _x = _x/k; _y = _y/k; _z = _z/k; double A[3][3] = {0,0,0,0,0,0,0,0,0}; for (int i = 0; i < k; i++) { double X = dataPts[nnIdx[i]][0]; double Y = dataPts[nnIdx[i]][1]; double Z = dataPts[nnIdx[i]][2]; A[0][0] += (X-_x) * (X-_x); A[0][1] += (X-_x) * (Y-_y); A[0][2] += (X-_x) * (Z-_z); A[1][0] += (Y-_y) * (X-_x); A[1][1] += (Y-_y) * (Y-_y); A[1][2] += (Y-_y) * (Z-_z); A[2][0] += (Z-_z) * (X-_x); A[2][1] += (Z-_z) * (Y-_y); A[2][2] += (Z-_z) * (Z-_z); } MatrixXd C(3,3); C <<A[0][0]/k, A[0][1]/k, A[0][2]/k, A[1][0]/k, A[1][1]/k, A[1][2]/k, A[2][0]/k, A[2][1]/k, A[2][2]/k; #pragma endregion EigenSolver<MatrixXd> es(C); MatrixXd Eval = es.eigenvalues().real().asDiagonal(); MatrixXd Evec = es.eigenvectors().real(); MatrixXd u,v,n; double a = Eval.row(0).col(0).value(); double b = Eval.row(1).col(1).value(); double c = Eval.row(2).col(2).value(); #pragma region SET U V N if(a>b && a>c) { u = Evec.row(0); if(b>c) { v = Eval.row(1); n = Eval.row(2);} else { v = Eval.row(2); n = Eval.row(1);} } else if(b>a && b>c) { u = Evec.row(1); if(a>c) { v = Eval.row(0); n = Eval.row(2);} else { v = Eval.row(2); n = Eval.row(0);} } else { u = Eval.row(2); if(a>b) { v = Eval.row(0); n = Eval.row(1);} else { v = Eval.row(1); n = Eval.row(0);} } #pragma endregion MatrixXd O(3,3); O <<u, v, n; MatrixXd UV(k,3); VectorXd N(k,1); for( int i=0; i<k; i++) { double x = dataPts[nnIdx[i]][0];; double y = dataPts[nnIdx[i]][1];; double z = dataPts[nnIdx[i]][2];; MatrixXd X(3,1); X << x-_x, y-_y, z-_z; MatrixXd T = O * X; double ui = T.row(0).col(0).value(); double vi = T.row(1).col(0).value(); double ni = T.row(2).col(0).value(); UV.row(i) << ui * ui, ui * vi, vi * vi; N.row(i) << ni; } Vector3d S = UV.colPivHouseholderQr().solve(N); MatrixXd II(2,2); II << S.row(0).value(), S.row(1).value(), S.row(1).value(), S.row(2).value(); EigenSolver<MatrixXd> es2(II); MatrixXd Eval2 = es2.eigenvalues().real().asDiagonal(); MatrixXd Evec2 = es2.eigenvectors().real(); double kmin, kmax; if(Eval2.row(0).col(0).value() < Eval2.row(1).col(1).value()) { kmin = Eval2.row(0).col(0).value(); kmax = Eval2.row(1).col(1).value(); } else { kmax = Eval2.row(0).col(0).value(); kmin = Eval2.row(1).col(1).value(); } double thresh = 0.0020078; if (kmin < thresh && kmax > thresh ) cout << x << " " << y << " " << z << " " << 255 << " " << 0 << " " << 0 << endl; else cout << x << " " << y << " " << z << " " << 255 << " " << 255 << " " << 255 << endl; } delete [] nnIdx; delete [] dists; delete kdTree; annClose(); } Thanks, NISHA…
ich is the following :
"in a box", i would like to create structure made by wooden blades that follow floor, wall and ceiling, but moving from this support due to "curves" which are the most important variables.
Here is my "logic". You will find enclosed to this post my files as well.
In bold what i'm unable to do by myself (i guess) :
Take the square of 25 m x 12 m ; make it a surface
I divide it in "blades" of 20 cm
I take the edges of the "blades"
I divide this edges in 40 points (or equivalent) (A)
I identify my curves (curves) which are on the floors
I identify the crosspoint between my edge-blade and the curves (B)
I have to test the difference between X Y Z of each A and B.
I have to test which B point is the closest of each A
Each A points which is close to B (Distance < 40 cm) must be on the floor
I have to input a math formula in order to représent the movement of A points regarding their distance to B (example : A1 Z = Distance between A1 and B / 2)
If there are 2+ B, that mean that i have "to do something" to get a correct movement. I mean
2 consecutives points must be on the same "plan"
2 height difference between each point must be 0 or a dedicated value
Regarding Ceiling, it is a duplication of the floor but there is coef to apply with Z distance.
2 parallele points on a define axis, example : X, and consecutive can't have more than 20cm of difference
When all points have moves regarding "parameters" and "curves"; i have to do curve linking all the point of a same "line".
After that i duplicate this curve to a upper curve.
Loft
Extrude surface and then, it's done ?
To be clear, i miss the part where i need to make my points move regarding variables...
I'm sorry, RHI Grasshopper projet.3dm does not represent the "need" to have to consecutive point on the same plan
…
pecific character it encounters in the file a specific curve would be created (a line with a particular length/orientation associated with that specific character) whose starting point is on the end of the last previous line. here is simple action list:
read first character in txt file
identify character (number 20 in attached example)
insert line associated with character (1" horizontal line)
read next character in txt file.
identify character (number 8 in attached example)
start curve (specific curve associated with the number 8 (1.25" vertical line)) on the end of the previous line.
read next character in txt file.
identify character (number 5 in attached example)
start curve (specific curve associated with the number 5 (.25" horizontal line)) on the end of the previous line.
etc
loop repeats till end of txt file.
i am good with everything else (linking the file, building curves on the ends of things, creating line parameter w/ persistent data, etc) but I'm having a problem with the "if/then" nature of the project. I haven't found a component that has this sophistication yet... I've tried the equals component that compare lists and identify true/false scenarios and the f(x) along with dispatch to create a curve if a single situation occurs (like if x>3, then make a circle) but what about the next character?
I am wondering if I should do this in C+ (which I also don't know) but would rather create this in grasshopper.
See attached for example grasshopper file and txt file.
I would really appreciate any help you can offer - Thanks!!!
// jon…
Added by jon kuzmich at 11:14pm on September 14, 2013
default damping is 10, "reset" solution becomes unstable with damping of about 25 or more. (your blue line and all)
3) every spring with finite stiffeness will change length. physicallly built structures will settle under load (several centimeters depending on load conditions). So fixed length segments are nonsense in phyiscal world in the first place. If you want segments to keep length, increase stiffness or rest length over desing length (think as initial length without load..) Keep in mind: large stiffness will cause instabilities in the simulation.
4) you can move referenced anchor points and the model will update. Introducing an additional anchor, like, at the top, will fix your model to this point. It will move, but will also try to apüply forces to this anchor. Anchor points need to incide with simulation nodes, when kangaroo is reset. So be sure to move your additional anchor to it's original position before you reset.…
ains a unique collection of integers. For example {0} is the simplest and most common path. If you add a dimension to this path, you can get results such as {0;0} or {0;1} or {0;25}.
In the case above, all our paths only have a single dimension, so we get: {0}, {1}, {2}, ... , {N}, depending on how many columns the grid has.
ho... breakfast time. I'll pick this up again in a bit. >>>…
Added by David Rutten at 1:59am on January 4, 2010
cussions on the forum about this topic. You simply need to add one more hour (25 hours) to see 24 hours on sun-path.
2. When you reduce the mesh density there are cases that test point falls behind the mesh face which will get no radiation. To avoid this issue you need to increase _distanceFromBase.
Hope it helps. Let me know if you have any other questions.
Mostapha
…
} that I want to remove and replace with whatever. How do I do that? The trees line up as needed, it is simply taking branch {30} from tree B, and shoving it into tree A instead of the current object/value at {30}, if that makes sense.
Thanks!
-BC
…
sando las nuevas tecnologías de la información en la arquitectura para la gestión del conocimiento de sistemas que desarrollen estructuras sustentables, desde los procesos de diseño generativos o algorítmicos. Donde se contempla la P.O.O. (programación orientada a objetos) como nuevo lenguaje de expresión para el arquitecto-diseñador en el siglo XXI.Los talleres están pensados para sigan un hilo conductual en el que al mismo tiempo que se enseña se investiga y experimenta. Por primera vez se contará con diversos miembros de SEED como docentes de forma presencial y por video conferencia, logrando de esta forma acercar a los especialistas que se encuentran en Europa a los asistentes de los talleres sin encarecer los costos.+info:http://www.studioseed.net/ adn-methodology/
Los talleres están dirigidos a personas que tengan o quieran conseguir un perfil alto de innovación, creatividad, flexibilidad: profesionales con actividades de dirección, gerencia, proyectistas, investigadores, así como a estudiantes a partir de 5to semestre en adelante. Cada taller abarca perfiles diversos de profesionales, mientras unos están más orientados a directivos y gerencias, otros más a proyectistas.
LOS TALLERES:FAB DIG I / ITESM – CEM / Estado de México / 20 hrs / 8 – 11 al de diciembre 2011 (En este taller no se aplican descuentos ni becas)PARAMETRIC GREEN HOUSING / Colegio de Arquitectos del estado de Jalisco (Por confirmar Sede) / Guadalajara / 20h + 5h proyecto / 30 enero 2012 al 4 de diciembre 2012FAB DIG II / ITESM – CEM / Estado de México / 30h + 5h proyecto / 8 a 12 febrero 2012TERCERA REVOLUCIÓN INDUSTRIAL: TIC`s + SOSTENIBILIDAD. Procesos y paradigmas emergentes / Querétaro / 20 hrs / 15 al 18 de febrero 2012INTRODUCCIÓN AL DISEÑO GENERATIVO / UAM-azc / DF / 8hrs / 13, 14 de enero (Costo representativo $650, máximo 40 personas, mínimo 15 personas)INTRODUCCIÓN A: SCRIPTING CON GRASSHOPPER ( Python) Y PLUGINS / Estudio SEED México / Estado de México / 30 hrs / 23, 24, 25 febrero y 1,2, 3 de marzo 2012…
Added by SEED studio at 3:30am on November 24, 2011
roduced to basic concepts on the geometry of curves and surfaces before an introduction to T-Splines, Autodesk's complex surface modeller. Participants will design furniture pieces or lighting products in T-Splines to be unfolded and laser cut or 3D printed using our digital fabrication tools. Objects produced will have the opportunity to be developed further and showcased on the online jewellery and product design shop cyberth.com. The design-based workshop will be supported by a series of presentations related to the workshop content. All participants will receive 25% off all digital fabrication services from 1+2D Digital Workshop for 3 months.The workshop is open to both students and professionals in architecture, industrial design, interior design, fashion, and any other related fields. To ensure maximum time with tutors, the workshop is limited to 8 participants. All participants should have basic knowledge of Rhino prior to enrolment. Please visit www.integrateacademy.com/workshops for more information.…
delling Symposium in Paris. Participants will look at translating force flow patterns of shell structures into 3d printed fibrous systems during the two day masterclass.
Registrations are still open for the masterclass running from 16-17 September and the symposium itself runs from 18-20 September.…