diff --git a/Makefile b/Makefile index 40f257e..02ec02d 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,13 @@ BOOKS = principles-of-programming computational-foundations-1 all: build deploy -build: build_preprocess build_jupyter_books build_pdflatex build_merge_html +build: build_jupyter_books build_pdflatex build_merge_html build_preprocess: ./in2md.sh files/cppintro.md.in > files/cppintro.md ./in2md.sh files/libraries_happly.md.in > files/libraries_happly.md ./in2md.sh files/libraries_happly_boostgeometry.md.in > files/libraries_happly_boostgeometry.md + cd cpp && ./maker.sh && cd .. build_jupyter_books: for book in $(BOOKS) ; do \ @@ -21,14 +22,13 @@ build_pdflatex: done build_merge_html: - mkdir -p _html + rm -rf _html && mkdir -p _html for book in $(BOOKS) ; do \ cp -a _build/$${book}/_build/html/. _html/$${book}/ ; \ done - cp index.html _html deploy: - cp _html/* /var/www/html/programming -R + rsync -a --delete _html/ /var/www/html/programming upload: rsync --no-perms --no-owner --no-group -avz --delete-after _html/* di67nav@webdev02-tum.lrz.de:~/webserver/htdocs/en/teaching/oer/programming diff --git a/computational-foundations-1_intro.md b/computational-foundations-1_intro.md index fcde11d..3ec6576 100644 --- a/computational-foundations-1_intro.md +++ b/computational-foundations-1_intro.md @@ -57,4 +57,3 @@ First the dates in 2022/23: |24.01.2023 | Lecture | |31.01.2023 | Lecture | |07.02.2023 | Lecture | -|-----------|--------------------| diff --git a/cpp/.gitignore b/cpp/.gitignore index 26100c5..147b2aa 100644 --- a/cpp/.gitignore +++ b/cpp/.gitignore @@ -1,7 +1,8 @@ -out.ply -*out +# files without an extension +* +!/**/ +!*.* + *.o -01_oldhelloworld -02_functionsignatures -03_library -libs_pcl_happly + +*.ply diff --git a/cpp/00_helloworld.makeout b/cpp/00_helloworld.makeout new file mode 100644 index 0000000..c6f2a9c --- /dev/null +++ b/cpp/00_helloworld.makeout @@ -0,0 +1 @@ +g++ -Wall -o 00_helloworld.out 00_helloworld.cpp diff --git a/cpp/00_helloworld.mk b/cpp/00_helloworld.mk index 6879e4c..5ece005 100644 --- a/cpp/00_helloworld.mk +++ b/cpp/00_helloworld.mk @@ -1,4 +1,4 @@ all: - g++ -Wall -o 00_helloworld.out 00_helloworld.cpp + g++ -Wall -o 00_helloworld 00_helloworld.cpp run: - ./00_helloworld.out + ./00_helloworld diff --git a/cpp/00_helloworld.runout b/cpp/00_helloworld.runout new file mode 100644 index 0000000..b7858c1 --- /dev/null +++ b/cpp/00_helloworld.runout @@ -0,0 +1,2 @@ +./00_helloworld.out +Hello World! diff --git a/cpp/01_oldhelloworld.makeout b/cpp/01_oldhelloworld.makeout new file mode 100644 index 0000000..d9d4b6d --- /dev/null +++ b/cpp/01_oldhelloworld.makeout @@ -0,0 +1 @@ +g++ -Wall -o 01_oldhelloworld 01_oldhelloworld.cpp diff --git a/cpp/01_oldhelloworld.runout b/cpp/01_oldhelloworld.runout new file mode 100644 index 0000000..1e4c1b9 --- /dev/null +++ b/cpp/01_oldhelloworld.runout @@ -0,0 +1,2 @@ +./01_oldhelloworld +Hello World! diff --git a/cpp/02_functionsignatures.makeout b/cpp/02_functionsignatures.makeout new file mode 100644 index 0000000..eac84b3 --- /dev/null +++ b/cpp/02_functionsignatures.makeout @@ -0,0 +1 @@ +g++ -Wall -o 02_functionsignatures 02_functionsignatures.cpp diff --git a/cpp/02_functionsignatures.runout b/cpp/02_functionsignatures.runout new file mode 100644 index 0000000..6aa3ef6 --- /dev/null +++ b/cpp/02_functionsignatures.runout @@ -0,0 +1,3 @@ +./02_functionsignatures +doubled(4)=8 +doubled(4.5)=9 diff --git a/cpp/03_library.makeout b/cpp/03_library.makeout new file mode 100644 index 0000000..032b701 --- /dev/null +++ b/cpp/03_library.makeout @@ -0,0 +1,3 @@ +g++ -c 03_doubled.cpp -o 03_doubled.o +g++ -c 03_library.cpp -o 03_library.o +g++ -o 03_library 03_library.o 03_doubled.o diff --git a/cpp/03_library.runout b/cpp/03_library.runout new file mode 100644 index 0000000..f8d20da --- /dev/null +++ b/cpp/03_library.runout @@ -0,0 +1,3 @@ +./03_library +doubled(4)=8 +doubled(4.5)=9 diff --git a/cpp/libs_pcl_happly.makeout b/cpp/libs_pcl_happly.makeout new file mode 100644 index 0000000..9c49f51 --- /dev/null +++ b/cpp/libs_pcl_happly.makeout @@ -0,0 +1 @@ +g++ -Wall -march=native -Ofast -o libs_pcl_happly libs_pcl_happly.cpp `pkg-config --cflags --libs eigen3` diff --git a/cpp/libs_pcl_happly.runout b/cpp/libs_pcl_happly.runout new file mode 100644 index 0000000..1b3ac4b --- /dev/null +++ b/cpp/libs_pcl_happly.runout @@ -0,0 +1,25 @@ +./libs_pcl_happly ../data/sofa_0007.off.ply +1.19209e-07 5.35772e-09 1 + 0.968583 -0.24869 5.35772e-09 + 0.24869 0.968583 1.19209e-07 +X:12.5626 1.57161 62.3903 +Y:12.5626 1.57161 62.3903 +X:10.5998 26.6352 34.551 +Y:10.5998 26.6352 34.551 +X: -13.9611 -0.0370637 -52.1099 +Y: -13.9611 -0.0370638 -52.1099 +X:0.212058 8.69847 50.2384 +Y:0.212058 8.69847 50.2384 +X:19.5171 19.3644 53.821 +Y:19.5171 19.3644 53.821 +X:-8.74778 -33.4929 -27.8639 +Y:-8.74778 -33.4929 -27.8639 +X:-2.20324 27.7459 50.2467 +Y:-2.20324 27.7459 50.2467 +X:-5.69343 -27.1792 -50.2527 +Y:-5.69343 -27.1792 -50.2527 +X:-9.87796 38.5962 7.98784 +Y:-9.87796 38.5962 7.98784 +X:-13.9611 28.2719 -8.07317 +Y:-13.9611 28.2719 -8.07317 +Warper diff --git a/index.html b/index.html deleted file mode 100644 index bb3d77e..0000000 --- a/index.html +++ /dev/null @@ -1,12 +0,0 @@ -<HTML> - <BODY> - <H1>Note: The scripts have been split into two pieces for your convenience</H1> - <UL> - <LI> <A HREF="computational-foundations-1">Computational Foundations I</A> - </LI> - <LI> - <A HREF="principles-of-programming">Principles of Programming </A> - </LI> - </UL> - </BODY> - </HTML> diff --git a/principles-of-programming_intro.md b/principles-of-programming_intro.md index 7806c51..139794d 100644 --- a/principles-of-programming_intro.md +++ b/principles-of-programming_intro.md @@ -71,7 +71,6 @@ First the dates in 2022/23: |24.01.2023 | Lecture + Tutorial | |31.01.2023 | Lecture + Tutorial | |07.02.2023 | Lecture + Tutorial | -|-----------|--------------------| ## Modules