mathnet / mathnet-spatial

Math.NET Spatial
http://spatial.mathdotnet.com
MIT License
380 stars 135 forks source link

Geometrical figures #30

Open ForNeVeR opened 8 years ago

ForNeVeR commented 8 years ago

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?

cdrnet commented 8 years ago

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.

gsomix commented 8 years ago

Good suggestions. I'm about to assist.

gsomix commented 8 years ago

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.

JohanLarsson commented 8 years ago

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

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!

ForNeVeR commented 8 years ago

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.