go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Closed REQ 5277]: 2 questions


  • To: software@geom
  • Subject: [Closed REQ 5277]: 2 questions
  • From: "Tamara Munzner" <munzner>
  • Date: Tue, 7 Mar 1995 01:34:27 -0600


Hi,

>	1. When Geomview.m is used to set the default display of Mathematica
>to Geomview and then PSDirect.m to return to the standart Mathematica
>display, the following occurs: the Geomview window remains open and if
>Geomview.m is reloaded, but no objects are being displayed - neither in
>Mathematica, nor in Geomview. In order to restart the Geomview display,
>one has to close the Geomview window first, then reload Geomview.m, and
>then proceed in the usual way. Am I doing something wrong, or this is a
>some software bug?

Hmm. You're not doing anything wrong, if you're running Mathematica in
a notebook. It does seem reasonable that you'd have to quit the old
copy of Geomview before loading Geomview.m again. It's not exactly a
feature, but I don't know that I'd call it a bug either...

>	2. When objects from Mathematica are transported to Geomview,
>the colors set in Mathematica are lost. Is there a way to preserve the 
>color of objects, e.g. when a surface is colored according to its scalar
>or Gaussian curvature, it is nice to be able view those colors while
>manipulating the object in Geomview.

The converter currently only recognizes RGBColor directives. Are you
using "Hue"? Here's some Mathematica code that will do the conversion.
Just use "HSBColor" instead of "Hue" in your own code.

UnProtect[HSBColor]

HSBColor[h_, s_, b_] := RGBColor[b, b, b] /; s == 0

HSBColor[h_?NumberQ, s_, b_] :=
        Block[{mh = 6 Mod[h, 1.], i, f, p, q, t},
                i = Floor[mh] ;
                f = mh - i ;
                p = b (1. - s) ;
                q = b (1. - s f) ;
                t = b (1. - s (1. - f)) ;
                {RGBColor[b, t, p] ,
                 RGBColor[q, b, p] ,
                 RGBColor[p, b, t] ,
                 RGBColor[p, q, b] ,
                 RGBColor[t, p, b] ,
                 RGBColor[b, p, q]
                } [[i + 1]]
        ]

Hope this helps,

Tamara Munzner		The Geometry Center	     ((555) 555-5555
munzner at geom.umn.edu    http://www.geom.umn.edu/people/munzner.html


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo