Live data from Hacker News

Show HN: 3D Vector Graphics

github.com

21–30 of 60 posts

Re: Show HN: 3D Vector Graphics

#21
post #20

If 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

Nice. I love Cairo. I'll check it out.

Re: Show HN: 3D Vector Graphics

#25

I thought I remembered seeing your graphics work before in go posted on HN. Yep: https://github.com/fogleman/pt Is this an evolution of that work, at least in terms of the learning process?

Yeah, I was able to reuse a lot of the path tracer code for this.

Re: Show HN: 3D Vector Graphics

#27
post #12
post #9

This 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…

unless 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.

Sufficiently large integers (and FP numbers too) are directly supported by Go's standard library: https://golang.org/pkg/math/big/

Re: Show HN: 3D Vector Graphics

#28
post #9

This 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…

The 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.

If 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%2Fper...

[2] https://help.sketchup.com/en/article/3000100 (last figure and text in the section "Subtracting one solid from another")

Re: Show HN: 3D Vector Graphics

#30

Question: at the bottom of 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?

Probably found the algorithm somewhere and used multiple selection in Sublime Text to quickly reformat it.

Anyway I think your webpage is very impressive! Nice job!
Post reply on HN