7 ms·
Show HN: 3D Vector Graphics
- WhiteNoiz3 11y agoThat's pretty cool. A commandline app that just takes an .OBJ file and renders it to an .SVG would actually be pretty useful (viewport position / orientation would of course need to be options as well).
- cirocosta 11y agoAgree! That'd be pretty cool
- fogleman 11y agoEven cooler if I could figure out some general way of parameterizing & texturing the surface instead of just rendering the triangles. Any ideas?
- jasonwatkinspdx 11y agoHughes Hoppe has done a variety of research that depends on finding interesting parameterizations of meshes. His papers aren't exactly lightweight on the math, but you may find some ideas there: http://research.microsoft.com/en-us/um/people/hoppe/ http://research.microsoft.com/en-us/um/people/hoppe/ http://research.microsoft.com/en-us/um/people/hoppe/proj/vfdesign/ http://research.microsoft.com/en-us/um/people/hoppe/proj/vfd... http://research.microsoft.com/en-us/um/people/hoppe/proj/lapped/ http://research.microsoft.com/en-us/um/people/hoppe/proj/lap...
- fogleman 11y agoAwesome, thanks. I'll check that out.
- nikolay 11y agoGreat! Hughes Hoppe's work is amazing!
- theoh 11y agoHugues Hoppe, unless he has changed his name.
- jasonwatkinspdx 11y agoShit. Thanks for your correction, I can no longer edit the above comment to reflect it, sorry.
- aardvark179 11y agoI seem to remember there's some good stuff from Pixar on contouring which might be helpful. http://graphics.pixar.com/library/Contours/paper.pdf http://graphics.pixar.com/library/Contours/paper.pdf
- kuya 11y agoif you check out the CGAL library, they have code that solves surface parameterization problems. the least squares conformal mapping is pretty nice for creating uv maps. http://doc.cgal.org/latest/Surface_mesh_parameterization/group__PkgSurfaceParameterizationMethods.html http://doc.cgal.org/latest/Surface_mesh_parameterization/gro... http://doc.cgal.org/latest/Surface_mesh_parameterization/Surface_mesh_parameterization_2Simple_parameterization_8cpp-example.html http://doc.cgal.org/latest/Surface_mesh_parameterization/Sur...
- IshKebab 11y agoNice work!
- echelon 11y agoThis is fantastic! I think I can use this in my laser projection work. :)
- fogleman 11y agoGlad to hear. Let me know if you have any questions.
- artursapek 11y agoThis is fantastic. I love programming geometry. This must be a lot of fun to work on. That gif at the bottom is mind bending https://camo.githubusercontent.com/9f83ca714a35fd2a08b85370f8cb7410cc70a839/687474703a2f2f692e696d6775722e636f6d2f676b385574564b2e676966 https://camo.githubusercontent.com/9f83ca714a35fd2a08b85370f...
- scrumper 11y agoThis looks pretty great, I'll play with it. Can you explain this from the Readme? Unfortunately, it's difficult to compute the joint formed at the boundaries of these combined shapes, so sufficient texturing is needed on the original solids for a decent result. What is hard about computing the joint? Why does texturing help? My question is from a perspective of curious ignorance, not arrogance (i.e. me saying "don't be silly, it's easy.")
- fogleman 11y agoThe texturing just helps your eye "fill in the gaps." As far as difficulty, I just don't know of a general way to do it. The only thing that comes to mind is some sort of iterative approximation or something.
- pierrec 11y agoIf I understand correctly, we want to compute co-edges here. I believe there are algorithms to do this, I know SketchUp has this feature [1]; also Gmsh [2]; and I remember seeing Blender plugins that do the same thing (can't seem to find them now...) (edit: Actually Blender does this without plugins: "Join" 2 intersecting objects, use the "Intersect" feature, and it will generate and select the exact co-edges.) [1] https://www.google.com/search?tbm=isch&q=site:http:%2F%2Fperso.uclouvain.be%2Fvincent.legat%2Fteaching%2Fdata%2Fmeca2170-GmshCompanion.pdf https://www.google.com/search?tbm=isch&q=site:http:%2F%2Fper... [2] https://help.sketchup.com/en/article/3000100 https://help.sketchup.com/en/article/3000100 (last figure and text in the section "Subtracting one solid from another")
- f2f 11y agounless you're dealing with sufficiently large integers computing the intersect between a line and a plane with any robustness is impossible on modern computers with float or double. sometimes when you intersect meshes that have nearly coplanar faces, the intersection might shoot vertices near some infinity because of division inaccuracy.
- scrumper 11y ago
- nikolay 11y agoThank you, @fogleman! We really love you work - including other projects!
- fogleman 11y agoThank you!
- Patient0 11y agoQuestion: at the bottom of https://github.com/fogleman/ln/blob/master/ln/matrix.go https://github.com/fogleman/ln/blob/master/ln/matrix.go Did you type that in manually? I wonder if there's a way to do that in Go that doesn't have as much duplication, but has the same performance?
- fogleman 11y agoProbably found the algorithm somewhere and used multiple selection in Sublime Text to quickly reformat it.
- Patient0 11y agoAnyway I think your webpage is very impressive! Nice job!
- daveloyall 11y agoIn emacs, `keyboard macro counters` are the appropriate tech for that job.
- evmar 11y agoIf you run into limitations with the Cairo binding you're using, I'd like to shamelessly plug the one I wrote, which covers much more of the Cairo API: https://godoc.org/github.com/martine/gocairo/cairo https://godoc.org/github.com/martine/gocairo/cairo
- fogleman 11y agoNice. I love Cairo. I'll check it out.
- rmcpherson 11y agoI thought I remembered seeing your graphics work before in go posted on HN. Yep: https://github.com/fogleman/pt https://github.com/fogleman/pt Is this an evolution of that work, at least in terms of the learning process?
- dawnbreez 11y agoI wonder if there are any libraries or tools for making simple 3D visualizations of data. Something like a 3-dimensional Conky.
- lukeadams 11y agoThe output reminds me of Blender's Freestyle plugin. This looks great though because it's not part of a software suite! ;) [0] https://www.blender.org/manual/render/freestyle/export_svg.html https://www.blender.org/manual/render/freestyle/export_svg.h...
- profeta 11y agoblender is, contrary to popular belief, extremely nimble and easy to compile/modify. it is all python, mostly. and can be used a command line tool with very little effort. you can make a "open obj file, put default camera, render" scripts very easily.
- Retr0spectrum 11y agoI'd love to see someone output this to an oscilloscope.
- Hydraulix989 11y agoHave you considered using bilinear gradients to do shading?
- Hydraulix989 11y agoActually, that's not part of the standard yet, but at least somebody is working on it: http://tavmjong.free.fr/blog/?p=316 http://tavmjong.free.fr/blog/?p=316
- santaclaus 11y agoThat's pretty rad! I wonder what it would like to bake pre-rendered color information onto the vector geometry. Even without textures on the models some nice ambient occlusion could look cool.
- Philipp__ 11y agoWow, this is amazing! Really, really nice work! Will read it and analyze it in-depth, think I could learn thing or two...
- krcz 11y agoIt might be an interesting idea to use similar algorithms to create vector plots in scientific PDF documents, instead of having embedded raster images that don't scale well.
- leni536 11y agoAn other similar software is Sketch[1]. It generates tikz images that you can compile in LaTeX. [1] http://sketch4latex.sourceforge.net/ http://sketch4latex.sourceforge.net/
- deleted 11y ago[deleted]
- philbarr 11y agoWhenever I see install instructions like this: OS X brew install cairo pkg-config go get github.com/ungerik/go-cairo Ubuntu sudo apt-get install libcairo2-dev pkg-config go get github.com/ungerik/go-cairo ... I always think there should be a "default" instruction page linked to somewhere that explains what brew and apt-get are (and other things). I mean, I know you can't be expected to go to the lengths of explaining this stuff for every single project, but this is the kind of thing that will inspire the next generation. So maybe we, as a community could come up with a, "you don't know what this is? look here..." kind of page that people can put on their github projects.
- pradn 11y agoWholeheartedly agreed. When I was learning about OSS, I had no idea what a "pull request" was but people kept mentioning it. A standard guide on how OSS works with Github, Linux, and related tools would be immensely helpful in welcoming new developers into the OSS world.
- deleted 11y ago[deleted]
- pjc50 11y agoThe google answer for "what is a pull request" is quite good.
- totalart9000 11y agoWe already have something. It's called man pages. I say this kind of tongue-in-cheek but I'm also serious about it at the same time.
- spdustin 11y agoman brew That won't help if you don't have Homebrew [0] installed. [0]: http://brew.sh http://brew.sh
- 11y ago
- kgabis 11y agoI just want to say that I'm a huge fan of your open source projects. Thanks for sharing them!
- phodo 11y agoSame here - Nice job. Craft (Minecraft in C / opengl) is a really cool project. I didn't realize it was the same person until I went back through the github repo just now.
- endgame 11y ago`ln` is a utility commonly used for making links. Searching for this project in the future is going to be a pest.
- obelisk_ 11y agoThis. Please rename the project.
- kami8845 11y agoCome on, it's on the first page for `ln 3d` where is your googlefu??
- mdup 11y agoOne could argue that as a name, `go` is not optimal either, yet it seems the community has worked around it pretty well.
- jarcane 11y agoIt's also an automatic path conflict on any *nix system as a result.