Message Boards Message Boards

GROUPS:

Change ColorFunction in imported stl file into graphics3D expression?

Posted 6 days ago
101 Views
|
2 Replies
|
2 Total Likes
|

I have a .stl file that I want to import into a Graphics3D expression, for which I use the command

Import["ExampleData/seashell.stl", "Graphics3D"]

enter image description here

As you can see, the color function mainly consists of pink and purple, and I want to change it.

Adding the ColorFunction option to the Import command doesn't make any change:

Import["ExampleData/seashell.stl", "Graphics3D", 
 ColorFunction -> "TemperatureMap"(*for example*)]

How can I change the color appearance of the 3D object?

2 Replies

Ehud,

what you basically need is Show. From documentation:

[Show] shows graphics with the specified options added.

The imported object is a Graphics3D, so you can apply the respective options like so (as an example):

shell = Import["ExampleData/seashell.stl", "Graphics3D"];
Show[shell, BaseStyle -> {Gray, Opacity[.6], Specularity[Red, 8]}, Lighting -> Automatic]

enter image description here

Posted 4 days ago

Thanks!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract