mathnet-spatial icon indicating copy to clipboard operation
mathnet-spatial copied to clipboard

Geometrical figures

Open ForNeVeR opened this issue 8 years ago • 5 comments

Hello. Is Math.NET Spatial is the proper place to add some geometrical figures such as cubes, spheres, cylinders etc?

I am working on multiple scientific projects and really tired of copying the definitions for all the basic geometry back and forth. Math.NET Spatial have all these great definitions for points and vectors, and that's cool already. But could we have the figures also?

I'm looking forward to contribute some stuff, but I am still in doubts about a) whether Math.NET Spatial is the proper place to put this stuff b) about the quality of my code - I am not the professional mathematician at all, I just have to work with some simple spatial definitions on a day to day basis.

What can you guys say? Maybe some ideas about what absolute minimal methods/definitions we should add to the figures or how the code should be structured (with inheritance from base Figure class or some another functional stuff)?

I am thinking about adding some basic stuff first (such as Box3D and Sphere3D maybe?) and adding the new methods (intersections/etc) based on the community feedback.

Maybe someone is already working on it?

ForNeVeR avatar Feb 25 '16 09:02 ForNeVeR

I'm not aware anyone us currently working on this already, but figures like cubes and cones would indeed fit perfectly into the scope of this project.

cdrnet avatar Feb 25 '16 09:02 cdrnet

Good suggestions. I'm about to assist.

gsomix avatar Feb 25 '16 10:02 gsomix

what absolute minimal methods/definitions we should add to the figures

@ForNeVeR I think we can define most of basic figures using linear dimensions (radius of sphere, height and radius of cylinder, etc) and local coordinate system. Minimal useful set of methods may include points/vertices/faces sampling.

gsomix avatar Feb 25 '16 10:02 gsomix

@gsomix about CoordinateSystem: there is need for big cleanup and API improvement.

  • Uses Matrix internally, probably suboptimal for performance.
  • The public API is borrowed from Autodesk Inventor, not happy with it at all.

The reason I'm writing this is so you guys don't hesitate to touch it if you find things that look dumb. I sometimes regret including it. @ForNeVeR sounds great!

JohanLarsson avatar Feb 25 '16 18:02 JohanLarsson

Well, guys, I'm already prototyping something and hopefully will be able to show you the API design in the nearest few days (nothing big though - just a simple API with a few box-based operations). I'll create a work-in-progress PR and we'll be able to discuss it in a more details.

ForNeVeR avatar Feb 26 '16 08:02 ForNeVeR