Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Polygons

  • To: mathgroup
  • Subject: Re: Polygons
  • From: twj
  • Date: Fri, 5 Jun 92 11:14:44 CDT

In response to the Art Ogawa mail last week about edges of polygons:

>You write:

>> I have encountered what seems to be a bug when using
>> Polygon in 3D-graphics.  I am running Mathematica 2.03
>> Enhanced on a Mac IIci.

>> The problem is that if a polygon is viewed "edge-on",
>> Mathematica gives a Postscript error message instead
>> of rendering the graphic.

>Welcome to the club. I've encountered the same problem in Mathematica
>and reported it to Wolfram himself, and to Tom Wickham-Jones, who
>has to do with the implementation of Mathematica's graphics capabilities.

>Neither has replied to my note. Perhaps by publicising this problem
>on math-group, wri will be made to feel pressure from users...

>You've hit upon a way of making Mathematica generate internal PostScript
>code that it cannot render, simply by viewing an Edge from an edge-on
>viewpoint.


Actually this is not the same problem.
What happened is that PostScript was made which did not draw anything.
Something like Show[ Graphics[]] was rendered.

The original mail was the complaint that if there was one polygon edge-on
a PostScript message would result.  This stated that there were no
PostScript drawing instructions in the cell.

This is a version of this problem....


tri3 = Polygon[ { {-1, 0,0}, {1,0,0}, {0, 0, -1}}]

Show[ Graphics3D[ tri3]]

Show[ Graphics3D[ tri3, ViewPoint -> {0,0,2}]]

On the Mac the second Show resulted in text in the graphics cell
stating that there was nothing to show.   Note that if another 3D
primitive was included this second object would be seen and no
messages produced.

In fact there is a problem here which is fixed in V2.1  This
error is that even if the Polygon can not be seen there is still
a box which may be drawn around the scene depending upon the
setting of the Boxed option.   In V2.0 if you drew nothing you would
not get a box but in V2.1 you will.

Thus apart from the drawing of the box this message from the Mac
FE is concerned with what should the response of the system to
something like 

Show[ Graphics[]]

Theo Gray likens the  message which tells you that the cell does not
contain any drawing instructions to a comment
"This page is intentionally left blank". 
The behaviour is debatable but it is not definitely an error.

Art Ogawa is talking about something completely different.
He is talking about how edges of polygons should be rendered.   

He makes the point that the thickness of the edges of polygons are
not given a perspective transformation.   Neither is the thickness
of lines and nor for that matter is text.

Whether or not this is a bug is a matter for debate.

First one can note that edges and lines are special objects, they
are not shaded acording to the lighting model.  Furthermore 
in many cases there is little difference between the two behaviours.
If you want lines to be cylinders you can make them as such and
make spheres instead of points.

Second if the perspective is to be included this would substantially
increase the size of the PostScript which is emitted to represent the
picture.   Having larger PostScript will use more system resources
and will also increasing the time to render the picture.  Do you
want this to happen in all cases?   If we say to people "we will change
3D graphics so that in some cases they look different but in most cases
they are unchanged but they will always be slower and use more system
resources"  what will they say?

The final point is that you really can have your cake and eat it.
It is quite easy to replace the polygons by a set of polygons some
of which will represent the edge.   You could easily make this the
default behaviour and have the unadulterated object returned.  This
is one of the strengths of Mathematica graphics, you can easily tailor
it to fit your needs.   You will anyway have to accept the extra
PostScript which this entails and you also must accept the extra
Mathematica expressions.  Note that in V2.1 these require less memory
and there are more tools to eliminate common sub-expressions which will
reduce the memory required.

Since you can get both types of behaviour I don't there is a problem
and I don't this can be called a bug in the renderer.







  • Prev by Date: Re: Functional solution to union of intervals
  • Next by Date: Re: text in graphics
  • Previous by thread: maybe better union of intervals
  • Next by thread: Yoda down and now ok again