ghilesz / geoml Goto Github PK
View Code? Open in Web Editor NEWA 2d geometry library for ocaml
License: GNU Lesser General Public License v2.1
A 2d geometry library for ocaml
License: GNU Lesser General Public License v2.1
After make :
Error: missing source file "./gcode/utils.ml" for package "gcode"
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
title is self explanatory
Hi,
There is a mistake on Segment.contains
. You should use Point.distance
instead of Point.sq_distance
.
Best regards,
Richard
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
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?
drawing.ml : overload the drawing functions of graphics for points lines and geoml types
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
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
self explanatory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.