Giter Club home page Giter Club logo

Comments (2)

sghr avatar sghr commented on August 20, 2024

If you are talking about IDelaunay.getTetrahedron(IVec[]), it returns an array of 4 points which represents each tetrahedron-shaped cell as 4 vertices, and you'd build lines, surfaces or meshes out of them if you want. Below is an example. It'd be heavy to run delaunay with many points because of its 5D loop but I don't know why it'd make it slower after finishing it unless you make lots of geometries along it.

import igeo.*;
size(800,600,IG.GL);
IVec[] pts = new IVec[100];
for(int i=0; i<pts.length; i++){ pts[i] = IRand.pt(100); }
IVec[][] vtx = IDelaunay.getTetrahedron(pts);
for(int i=0; i<vtx.length; i++){
IColor c = IRand.clr();
new ISurface(vtx[i][0],vtx[i][1],vtx[i][2]).clr(c);
new ISurface(vtx[i][0],vtx[i][1],vtx[i][3]).clr(c);
new ISurface(vtx[i][0],vtx[i][2],vtx[i][3]).clr(c);
new ISurface(vtx[i][1],vtx[i][2],vtx[i][3]).clr(c);
}

from igeo.

pjetrusp avatar pjetrusp commented on August 20, 2024

Thank you for your kind reply.
Could you elaborate on other two components, and their use in creating delaunay triangulation. To be more specific, I am trying to triangulate a surface, which has a number on points on it.

from igeo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.