On Monday, 20 June 2016 18:02:53 UTC+3, blue...@gmail.com wrote: > > > <https://lh3.googleusercontent.com/-bPOQJTHF8Js/V2gEJqUg5jI/AAAAAAAAACI/lg6cWG0cJqo0tFl4wsuDYF2w4kycTbRPACLcB/s1600/blank.png> > > I am attempting to generate a random starfield, in go. This is something > that will need to printed on actual paper, but that is another issue and I > only mention it to give some context for what I am doing here: Using go to > create graphics to pair with something I'm already doing in go (I've been > through several iterations of trying to use the go parts I have with > numerous variations of tex/latex templates using asymptote, and I reached a > point of frustration where I figured why not just do it all in go, as it > seems less a problem than I originally thought -- but opens a new set of > problems to solve, one of the biggest is that I know nothing at all about > graphics, let alone how to apply graphics in go). >
For understanding graphics, learn how to do these without any libs: * remove a color channel * brighten/darken/contrast image * blur an image * blend two images together (add, sub, mul, div etc. try combining different color channels differently) * gradients (i.e. conversion from hsl to rgb) * noise (with a few parameters) * combine multiple layers of noise (tip, blur some of the layers) * draw a line * draw a circle * draw a rotating wireframe cube * draw a filled circle filled with noise * draw a thick line filled with noise Don't worry about the performance/quality of each of those, do the stupidest thing first, play around with them. Much of this kind of graphics programming is about learning how to do the simple primitives and combine them. You can take a look at Inigo Quilez, an amazing artist/programmer https://www.youtube.com/watch?v=emjuqqyq_qc, see the process how he combine simple things to get to something amazing. Plus he has plenty of good articles http://www.iquilezles.org/www/index.htm. For printing, just make the image large. *additional tip: use https://github.com/loov/watchrun (or compile on save from editor) to monitor when you change your code and automatically regenerate the output image, that way you don't have to manually recompile/run/open the file every time* + Egon -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.