Subject: CGAL users discussion list
List archive
- From: John Doe <>
- To: "" <>
- Subject: [cgal-discuss] From installation to that first example on the MAC
- Date: Wed, 24 Feb 2016 11:07:04 +0000 (UTC)
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:u+he7R0e/igmxAXCsmDT+DRfVm0co7zxezQtwd8ZsegfLfad9pjvdHbS+e9qxAeQG96LtLQZ26GP7OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6NyZnnnLnts7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JsKWqrze+E0TKdTES89G2Ez/szi8xfZB0Pb7XQVViAakwFDHhPexBD8RJb49CXg4LlH1TGeLPHxGJIzWTLqw6BmAEvzgyAbKiUl60nGg8x3i+RQpxf39DJlxIuBQoaVMrJSea6VKc8RXmFGQtp5WClIA4f6ZIwKWblSdd1EppXw8gNd5SC1AhOhUbvi
Dear All
Other MAC users will likely encounter my problems. So for
posterity (anyone facing this)
"CGAL developers are not involved in the creation of the macport or
homebrew packages"
Love it. It sounds like "We don't wan' yo' kind round here" :-)
but I am thankful for the info given to me. I can see that
CGAL is primarly aimed for Linux.
From the MAC to that first example:
Thanks to info gleaned from various sources on the web
especially David Dumas.
My comments and actions are marked with ->
-> Installation:
-> From http://doc.cgal.org/latest/Manual/installation.html#title3
sudo port install cgal
sudo port install cgal +qt5 +universal +demos
-> From the forum, I found out that this download applies to the MAC as well as Linux:
-> I created documents/CGAL where I put CGAL-4.7.tar.gz
cd Documents/CGAL
tar xzf CGAL-4.7.tar.gz
-> From http://doc.cgal.org/latest/Manual/installation.html
-> My MAC already had cmake
-> The following are commands I tentatively tried that were accepted:
cd Documents/CGAL
cd CGAL-4.7
cmake -gui
# Note the space before the -gui
cmake .
make
make examples
make demos
-> Then I moved to my first example:
cd examples/Convex_hull_2
-> It took a lot of other people's pain to figure to compile
-> and link the compiled code to the appropriate libraries
-> http://stackoverflow.com/questions/8404968/compiling-a-basic-cgal-program-in-c-on-mac-os-x-10-7-2
-> http://stackoverflow.com/questions/24395068/compiling-cgal-programs-on-mac-installed-using-macports
g++ -L/opt/local/lib -lcgal -I/opt/local/include/ -lgmp ch_from_cin_to_cout.cpp
-> The above worked. To run the code: follow MCS 481 David Dumas
-> http://homepages.math.uic.edu/~ddumas/teaching/2014/spring/mcs481/cgal-example/
./a.out < ch_from_cin_to_cout.cin > hull.txt
-> I installed gnuplot with macports
gnuplot
set term png
set output "input.png"
set title "Points"
set size square
set key off
set xrange [-1000:9000]
set yrange [-1000:9000]
plot "ch_from_cin_to_cout.cin" w p ps 0.25
exit gnuplot
cp hull.txt hull_closed.txt
head -1 hull.txt >> hull_closed.txt
gnuplot
set term png
set output "output.png"
set title "Convex Hull"
set size square
set key off
set xrange [-1000:9000]
set yrange [-1000:9000]
plot "ch_from_cin_to_cout.cin" w p ps 0.25, \
"hull_closed.txt" w p ls 3, \
"" w l
exit gnuplot
====
So finally I get input.png and output.png which shows the convex hull
(convex envelope) around the data points in "ch_from_cin_to_cout.cin".
I could use some advice w.r.t. getting Scilab to work with CGAL
on the MAC. Apparently this can be done.
best wishes
Tony
- [cgal-discuss] CGAL sur le MAC: ou sont vos exemples?, John Doe, 02/22/2016
- Re: [cgal-discuss] CGAL sur le MAC: ou sont vos exemples?, Sebastien Loriot (GeometryFactory), 02/22/2016
- Message not available
- [cgal-discuss] Fw: CGAL sur le MAC: ou sont vos exemples?, John Doe, 02/23/2016
- [cgal-discuss] From installation to that first example on the MAC, John Doe, 02/24/2016
- Re: [cgal-discuss] From installation to that first example on the MAC, Sebastien Loriot (GeometryFactory), 02/24/2016
- Re: [cgal-discuss] From installation to that first example on the MAC, Monique Teillaud, 02/24/2016
- Re: [cgal-discuss] From installation to that first example on the MAC, rytis, 02/26/2016
- Re: [cgal-discuss] From installation to that first example on the MAC, Monique Teillaud, 02/24/2016
- Re: [cgal-discuss] From installation to that first example on the MAC, Sebastien Loriot (GeometryFactory), 02/24/2016
- [cgal-discuss] From installation to that first example on the MAC, John Doe, 02/24/2016
- [cgal-discuss] Fw: CGAL sur le MAC: ou sont vos exemples?, John Doe, 02/23/2016
Archive powered by MHonArc 2.6.18.