Coder Social home page Coder Social logo

geoml's People

Contributors

bureau303 avatar ghilesz avatar moimoimoimoi avatar remyzorg avatar stevenvar avatar tbrup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geoml's Issues

Cannot compile

After make :

Error: missing source file "./gcode/utils.ml" for package "gcode"

Use function hypot instead of sqrt (dx*.dx+.dy*.dy)

Hello,
Since OCaml 4.00, there is the function hypot in the standard library. It is said to avoid undue overflow or underflow.
It could be used in Point.distance and Vector.magnitude. In my program, using hypot led me to different (and hopefully more precise) results.

Best,
Richard

Compilation fails

Not sure if this is a pilot error...

After cloning the repo, compiling with make gives these error messages:

dune build src/geoml.cma
Entering directory '/Users/thomasbrupbacher/temp'
File "geoml/src/constraint.mli", line 7, characters 18-24:
7 | type t = private Line.t * comp
^^^^^^
Error: Unbound type constructor Line.t
File "geoml/src/polygon.mli", line 5, characters 17-24:
5 | type t = private Point.t list
^^^^^^^
Error: Unbound type constructor Point.t
File "geoml/src/curve.ml", line 4, characters 11-18:
4 | type t = Point.t * Point.t * Point.t
^^^^^^^
Error: Unbound type constructor Point.t
make: *** [build] Error 1

Being relatively new to Ocaml, I have no idea how to fix this.

Environment:
MacOS 10.14.x
Ocaml 4.08.1

Why no voronoi diagram ?

Whoa, GeoML is amazing! I use it for all my ocaml geometry problems. But I'm so sad I can't directly get voronoi diagram :'( Have you planned VD for the future of GeoML?

make a drawing.ml

drawing.ml : overload the drawing functions of graphics for points lines and geoml types

Negative area value

Using module Polygon :

open Polygon
let _ =
  let l = [(0.,0.);(0.,1.);(1.,1.);(1.,0.)] in
  let points = List.map (fun (x,y) -> Point.make x y) l in
  area points |> print_float 

returns -1

Fix of Circle.intersection and other suggestions...

Hello,

I have discovered a bug several months ago on Circle.intersection. I fixed it in:
richardalligier@b3c59e3/src/circle.ml

I am not "git fluent" and the commit containing this fix also include others things so I cannot easily make a pull request so please feel free to make a copy/pasta... sorry...

Just a few additional suggestions:
_As the doc is automatically generated, I do not feel like it should be included in the git
_I feel like that modeling lines as (y=ax+b or x=c) is prone to numerical issues, so i have changed as (ax+by+c=0) (see richardalligier@b3c59e3/src/line.ml ). Likewise, the Line.intersection uses the package lacaml to solve the linear system. I think it will do a better job than me at dealing with numerical issues. However it introduces a dependence... If you are interested in all the things I suggested, you can merge the commit richardalligier@b3c59e3

Best,
Richard

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.