Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.algorithms > #931
| From | John Forkosh <forkosh@panix.com> |
|---|---|
| Newsgroups | comp.graphics.algorithms |
| Subject | Re: decorative random colors algorithm |
| Date | 2012-07-05 12:23 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <jt40vj$b0s$1@reader1.panix.com> (permalink) |
| References | <jspf0f$moq$1@reader1.panix.com> <34b5c6a0-c79e-4a8f-bf71-4d480c9a5dc3@googlegroups.com> <jt3121$i2j$1@reader1.panix.com> <jt3a5q$hub$1@reader1.panix.com> |
JohnF <john@please.see.sig.for.email.com> wrote:
>
> I think I got your (and Foley,van Dam's) algorithms right,
> but have included the updated function below. For example,
> I didn't have your limtab, and just clipped your single
> r,g,b's to 1.0. Don't think that accounts for
> any of the "diff difference".
I realized that my snippet of clipping code
> double r = l+u+u, g = l-u+v, b = l-u-v;
> double rgbmax = (r>g? (r>b?r:b) : (g>b?g:b));
> if ( rgbmax > 1.0 ) {
> r /= rgbmax; g /= rgbmax; b /= rgbmax; }
> red = (int)(255.0*r + 0.5);
> green = (int)(255.0*g + 0.5);
> blue = (int)(255.0*b + 0.5);
which I inferred from
your Section 4.3 discussion
Proportional clipping
improves the quality
m=max(r,g,b)
If m>255 Then
Begin
s=255/m
r=Round(r*s)
g=Round(g*s)
b=Round(b*s)
End
can't possibly be equivalent to your table clipping
that you're doing in Section 8
rb:=LimTab^[ri]; { Limiter by table }
gb:=LimTab^[gi];
bb:=LimTab^[bi];
since you're clipping each component independently,
i.e., if LimTab^[ri] < ri gets clipped, the other
two aren't (necessarily) affected at all.
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
Back to comp.graphics.algorithms | Previous | Next — Previous in thread | Next in thread | Find similar
decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-01 12:15 +0000
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-01 07:59 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-02 07:58 +0000
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-02 12:29 +0000
Re: decorative random colors algorithm Nobody <nobody@nowhere.com> - 2012-07-01 16:25 +0100
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-02 08:28 +0000
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-03 01:17 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-03 10:27 +0000
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-03 21:50 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 05:15 +0000
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 08:01 +0000
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-04 02:20 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 09:51 +0000
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 10:59 +0000
Re: decorative random colors algorithm Wally W. <ww84wa@aim.com> - 2012-07-04 09:03 -0400
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 13:46 +0000
Re: decorative random colors algorithm Wally W. <ww84wa@aim.com> - 2012-07-04 12:39 -0400
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-04 07:10 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-04 15:05 +0000
Re: decorative random colors algorithm gernot.hoffmann@hs-emden-leer.de - 2012-07-04 09:12 -0700
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-05 03:18 +0000
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-05 05:54 +0000
Re: decorative random colors algorithm John Forkosh <forkosh@panix.com> - 2012-07-05 12:23 +0000
Re: decorative random colors algorithm "Skybuck Flying" <Windows7IsOK@DreamPC2006.com> - 2012-07-05 07:48 +0200
Re: decorative random colors algorithm JohnF <john@please.see.sig.for.email.com> - 2012-07-05 06:14 +0000
Re: decorative random colors algorithm Wally W. <ww84wa@aim.com> - 2012-07-05 07:30 -0400
csiph-web