Hey guys.
Thanks for the help. I have to clarify my question a bit.

f(x,y) and a0 are given and do not assume any properties.
Find g(x,y) and b0, such that for *any* list of numbers v,

(reduce f a0 v) = (reduce g b0 (reverse v))

------------------------------

In case it helps at all, my specific problem is like this:

v is a list of number pairs.
v = [ [1 1] [0.5 1] [0.1 1] [0.3 3] ]
a0 = [0 0]

and f =
(fn [[c2 a2] [c a]]
  [(+ c (* (- 1 a) c2)) a2])

It's the formula I'm using for blending translucent pixels on top of
each other.
Currently I'm drawing back to front and accumulating the color with
the above function.

But for optimization purposes, it's much better to render front to
back and take advantage of an early exit condition. But for that, I
need a inverse-reduce function g(x,y), which is how this question
popped into my head.

Thanks so much for the help
  -Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to