Hi, @Simon Danish. So posted issue as suggested: new issue <https://github.com/JuliaGL/GLVisualize.jl/issues/37>. Have tried the screenshot(window, path="screenshot.png") and get ArgumentError: function screenshot does not accept keyword arguments. Where window = visualize(obj). Obviously I need to go back and look at the documentation.
@Andre Bieler this is awesome! thank you - just what I was looking for - you should add it to something, anything. Not sure if that be Meshes.jl, MeshIO.jl or Meshing.jl. As a side note: I was directed toward using Barycentric_coordinate_system <https://en.wikipedia.org/wiki/Barycentric_coordinate_system> something like accurate-point-in-triangle-test.html <http://totologic.blogspot.fr/2014/01/accurate-point-in-triangle-test.html> But will be looking at yours first. @Steve Kelly thanks - needed that pep talk. And it was easy we probably wouldn't be doing it. On Tuesday, 24 November 2015 06:11:15 UTC+2, Andre Bieler wrote: > > I dont know if this is still needed. But I think I did a similar thing a > while ago. > > One difference being I used .ply files instead of .obj files. > From what I understand it should be straight forward to transform .obj to > .ply > with something like paraview or meshlab. > (It has to be ascii .ply for my example to work) > > Attached is an example script that computes the intersection point of a > line of sight > and a collection of triangles (your surface mesh I assume) > it returns the index of the triangle which is intersected and the > coordinates of the > point of intersection. > > If multiple triangles are intersected it returns the index and coordinates > of the closest > triangle. > > if no intersection is found it returns -1 as index and [0,0,0] as the > intersection point > (this is to have the function return type stable) > > I attached a zip archive containing the necessary julia file and an example > .ply file of a triangulated cow :) > > All you have to define is the starting point of the line of sight "pStart" > and the direction towards it is pointing "r". > "r" has to be a unit vector > > > Any comments are welcome. > > Cheers > Andre > > >
