Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

complex vector gradients

4 views
Skip to first unread message

pluton

unread,
Mar 5, 2010, 10:12:06 AM3/5/10
to
Hi,

at the following web address :

http://www.sciences.ch/htmlfr/chimie/chimiequantique01.php

if you scroll down to figure (53.175), you'll see chemical orbitals in
the form of gradients. I would like to reproduce such images in a pure
vector format. Is there a way to create gradients in eps based on a
mathematical formulation?
(even though it is an approximation)

Thank you,

pluton

Jeffrey H. Coffield

unread,
Mar 5, 2010, 11:10:04 AM3/5/10
to

It's been a long time since I studied those types of formulas but if you
look at figure 53.173, the right side is a series of slices of the
probability distribution. So if you drew each one starting with a low
probability factor and filled it in, then as you increased the
probability, each new layer would be smaller and you could change the
color.

Otherwise a shading dictionary with a Type 1 (Function-Based) Shading as
described on page 265 of the PostScript Language Reference, Third
Edition could also work but I have (unfortunately) never had the need to
use that yet.

Also, the right side of figure 53.171 doesn't seem to match the left
side but I can't read French.

Jeff Coffield

pluton

unread,
Mar 5, 2010, 11:31:46 AM3/5/10
to
On 5 mar, 11:10, "Jeffrey H. Coffield" <jeff...@digitalsynergyinc.com>
wrote:

> pluton wrote:
> > Hi,
>
> > at the following web address :
>
> >http://www.sciences.ch/htmlfr/chimie/chimiequantique01.php
>
> > if you scroll down to figure (53.175), you'll see chemical orbitals in
> > the form of gradients. I would like to reproduce such images in a pure
> > vector format. Is there a way to create gradients in eps based on a
> > mathematical formulation?
> > (even though it is an approximation)
>
> > Thank you,
>
> > pluton
>
> It's been a long time since I studied those types of formulas but if you
> look at figure 53.173, the right side is a series of slices of the
> probability distribution. So if you drew each one starting with a low
> probability factor and filled it in, then as you increased the
> probability, each new layer would be smaller and you could change the
> color.


yes I see what you mean but it would be a constant color by "slice".
To get an exact
gradient I then would need an infinite number of slices or layers.


> Otherwise a shading dictionary with a Type 1 (Function-Based) Shading as
> described on page 265 of the PostScript Language Reference, Third
> Edition could also work but I have (unfortunately) never had the need to
> use that yet.

I will have a look at this reference. Thanks


> Also, the right side of figure 53.171 doesn't seem to match the left
> side

There are mistakes in this website.


> but I can't read French.

At least, you know it is French :)


Jeffrey H. Coffield

unread,
Mar 5, 2010, 12:09:47 PM3/5/10
to

pluton wrote:


>
> yes I see what you mean but it would be a constant color by "slice".
> To get an exact
> gradient I then would need an infinite number of slices or layers.
>
>

In theory yes, but all printers and display have a finite resolution so
if you used something that produced around 50 to 200 gradations per inch
it would look smooth. Obviously the more gradations, the longer the RIP
time.

Jeff

pluton

unread,
Mar 5, 2010, 12:24:29 PM3/5/10
to

> In theory yes, but all printers and display have a finite resolution so
> if you used something that produced around 50 to 200 gradations per inch
> it would look smooth. Obviously the more gradations, the longer the RIP
> time.

but when we use the gradient tool in Illustrator for instance, don't
we get
an exact gradient in such a way that, you could zoom indefinitely into
the gradient
without seeing any "slice" ? According to me, as soon as there is an
interpolation
in the form of a mathematical function (such as a spline), there is no
limitation.

Jeffrey H. Coffield

unread,
Mar 5, 2010, 12:41:42 PM3/5/10
to

True. I normally think of PostScript in terms of a final print device.
The second method I mentioned should take care of that as the gradient
should always be computed at the current display resolution.

Gernot Hoffmann

unread,
Mar 5, 2010, 1:03:54 PM3/5/10
to

Illustrator doesn't handle mathematical models by formulas.
PostScript does, if programmed. Here are some examples, how
to render convex objects or landscapes / terrains.
http://www.fho-emden.de/~hoffmann/pstutor22112002.pdf

The surfaces are represented mathematically by functions of
two parameters.
Each mesh cell is rendered by a fixed color (PS Level 2),
because my host system PSAlter doesn't support PS Level 3
for gradients by Gouraud shading.

A top view onto the quoted surface models won't be a big
issue as vector graphic.

Best regards --Gernot Hoffmann

pluton

unread,
Mar 5, 2010, 4:09:17 PM3/5/10
to
On 5 mar, 13:03, Gernot Hoffmann <hoffm...@fho-emden.de> wrote:
> On 5 Mrz., 18:24, pluton <plutones...@gmail.com> wrote:
>
> > > In theory yes, but all printers and display have a finite resolution so
> > > if you used something that produced around 50 to 200 gradations per inch
> > > it would look smooth. Obviously the more gradations, the longer the RIP
> > > time.
>
> > but when we use the gradient tool in Illustrator for instance, don't
> > we get
> > an exact gradient in such a way that, you could zoom indefinitely into
> > the gradient
> > without seeing any "slice" ? According to me, as soon as there is an
> > interpolation
> > in the form of a mathematical function (such as a spline), there is no
> > limitation.
>
> Illustrator doesn't handle mathematical models by formulas.
> PostScript does, if programmed. Here are some examples, how
> to render convex objects or landscapes / terrains.http://www.fho-emden.de/~hoffmann/pstutor22112002.pdf

>
> The surfaces are represented mathematically by functions of
> two parameters.
> Each mesh cell is rendered by a fixed color (PS Level 2),
> because my host system PSAlter doesn't support PS Level 3
> for gradients by Gouraud shading.
>
> A top view onto the quoted surface models won't be a big
> issue as vector graphic.
>
> Best regards --Gernot Hoffmann

ok, thank you both, I will investigate but it looks like a non-
straight-forward task...

James Cloos

unread,
Mar 7, 2010, 4:05:54 PM3/7/10
to
> http://www.sciences.ch/htmlfr/chimie/chimiequantique01.php

> if you scroll down to figure (53.175), you'll see chemical orbitals in
> the form of gradients. I would like to reproduce such images in a pure

It looks like radial gradients will work for those; they are available
in PDF, SVG and in level3 postscript.

I am not aware of any currently shipping RIPs which lack support for at
least linear and radial gradients, although there are likely some older,
level2 RIPs still in use.

-JimC
--
James Cloos <cl...@jhcloos.com> OpenPGP: 1024D/ED7DAEA6

0 new messages