News for hackers. Stuff that matters.
Re:Show HN: Programming with Escher by ttoinou on Tuesday May 30, 2017 @09:17PM (#14449849)
Ok for forward drawing, what about backward drawing ? i.e. finding the (u,v) of the fish image from the (x,y) inside the infinite square ?
Re:Show HN: Programming with Escher by mapio on Wednesday May 31, 2017 @01:04AM (#14450523)
Beside the fact that the square fits the unit square and is not infinite at all, I'm not sure to get what you mean…
Re:Show HN: Programming with Escher by ttoinou on Wednesday May 31, 2017 @10:02AM (#14452570)
If you draw a line from Point A to Point B, that's called Forward Drawing / Mapping. Basically you will loop over every sample that you know (thanks to a mathematical study) go near your line.

The reverse would be to look at every sample you have and decides its colors based on the line information (the two points) with basic geometric calculus (distance of a point to a line). Applying anti-aliasing / thicks borders is more easy in this way also.

The reverse is called Backward Drawing / Mapping, and is fit for GPU programming and others uses. Some problems are only defined for one kind of drawing and it's difficult to transform it to the other kind. It's like finding the inverse function of a mathematical function, hard.

Re:Show HN: Programming with Escher by mapio on Wednesday May 31, 2017 @02:34PM (#14454835)
Sounds interesting… can you provide any reference? A technical/scientific paper, a book, a Wikipedia entry… I was unable to Google it using both "Backward Drawing" and "Backward Mapping" as keywords.
Re:Show HN: Programming with Escher by ttoinou on Wednesday May 31, 2017 @04:39PM (#14455722)
I learned "Forward Mapping" in a scientific paper when I was creating my own morphing and deformations algorithms, I don't remember which paper. (Some Googled links I just found : http://biomachina.org/courses/imageproc/051.pdf , https://www.cs.auckland.ac.nz/courses/compsci773s1c/lectures... )

The term is mainly used for image interpolation and GPU textures. I prefer to say "drawing" because the notion can be extended to anything you want to visualise.

On the internet you can find a lot of visualization by forward drawing on a canvas. But recently there's more and more backward drawing with GPU and shaders (goto https://www.shadertoy.com/ for a lot of examples)

Re:Show HN: Programming with Escher by Robin_Message on Wednesday May 31, 2017 @08:33AM (#14451952)
The u,v coordinates are infinite since an infinite number of copies fit in the unit square.
Re:Show HN: Programming with Escher by ttoinou on Wednesday May 31, 2017 @09:53AM (#14452486)
Yes that's what I meant thx The same question goes Escher Infinite Circle. I know it has something to do with Poincaré Disk Model but can't figure it out