Color the polygons in PolyhedronDataDraw Multiple Polygons Given Their VerticesObtain polygons describing all intersections of many polygonsPlot a partition of the sphere given vertices of polygonsCreate region from polygons and tangential line segmentsMinimal perimeter of all possible polygonsScale size PolyhedronDataWhat has changed in PolyhedronData in V11How to decompose a self intersecting polygon into simple polygons?How to get the list of vertices of each side of a convex hull 3D figure
Alchemist potion on Undead
Stuffing in the middle
Color the polygons in PolyhedronData
Why does my air conditioner still run, even when it is cooler outside than in?
Are there any OR challenges that are similar to kaggle's competitions?
Does git delete empty folders?
Nuclear decay triggers
Count the frequency of integers in an array
How to create a summation symbol with a vertical bar?
Chess software to analyze games
Sous vide chicken without an internal temperature of 165
Mixing colours for a symbol
How to get distinct values from an array of arrays in JavaScript using the filter() method?
Don't teach Dhamma to those who can't appreciate it or aren't interested
How big would a Daddy Longlegs Spider need to be to kill an average Human?
Church Booleans
Is there a commercial liquid with refractive index greater than n=2?
Is "stainless" a bulk or a surface property of stainless steel?
Default camera device to show screen instead of physical camera
How to compare two different formulations of a problem?
Changing a TGV booking
How to think about joining a company whose business I do not understand?
How to dismiss intrusive questions from a colleague with whom I don't work?
Metal that glows when near pieces of itself
Color the polygons in PolyhedronData
Draw Multiple Polygons Given Their VerticesObtain polygons describing all intersections of many polygonsPlot a partition of the sphere given vertices of polygonsCreate region from polygons and tangential line segmentsMinimal perimeter of all possible polygonsScale size PolyhedronDataWhat has changed in PolyhedronData in V11How to decompose a self intersecting polygon into simple polygons?How to get the list of vertices of each side of a convex hull 3D figure
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
What is the simplest method for coloring each polygon face of a polyhedron with a specified color? For instance suppose I have a list of $12$ colors ( Red, Green, ...
) I would like to apply to the different faces of a PolyhedronData["Dodecahedron"]
in some assigned order and keep the entity as a Dodecahedron
.
geometry polyhedrondata
$endgroup$
add a comment |
$begingroup$
What is the simplest method for coloring each polygon face of a polyhedron with a specified color? For instance suppose I have a list of $12$ colors ( Red, Green, ...
) I would like to apply to the different faces of a PolyhedronData["Dodecahedron"]
in some assigned order and keep the entity as a Dodecahedron
.
geometry polyhedrondata
$endgroup$
add a comment |
$begingroup$
What is the simplest method for coloring each polygon face of a polyhedron with a specified color? For instance suppose I have a list of $12$ colors ( Red, Green, ...
) I would like to apply to the different faces of a PolyhedronData["Dodecahedron"]
in some assigned order and keep the entity as a Dodecahedron
.
geometry polyhedrondata
$endgroup$
What is the simplest method for coloring each polygon face of a polyhedron with a specified color? For instance suppose I have a list of $12$ colors ( Red, Green, ...
) I would like to apply to the different faces of a PolyhedronData["Dodecahedron"]
in some assigned order and keep the entity as a Dodecahedron
.
geometry polyhedrondata
geometry polyhedrondata
edited 7 hours ago
halmir
11.3k28 silver badges47 bronze badges
11.3k28 silver badges47 bronze badges
asked 9 hours ago
David G. StorkDavid G. Stork
26k2 gold badges23 silver badges58 bronze badges
26k2 gold badges23 silver badges58 bronze badges
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
faces = First@Normal@PolyhedronData["Dodecahedron", "Faces"];
colors = Table[ColorData[97, i], i, 12];
Graphics3D@Riffle[colors, faces]
$endgroup$
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
add a comment |
$begingroup$
You can get the polygons directly using the property "Polygons"
:
polygons = PolyhedronData["Dodecahedron", "Polygons"];
colors = ColorData[97]/@Range[12];
Graphics3D[Transpose[colors, polygons]]
$endgroup$
add a comment |
$begingroup$
This works, but could be improved:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
myFaceIndices = PolyhedronData["Dodecahedron", "Faces"];
mycolors = Red, Orange, Yellow, Green, Blue, Orange, Black, White,
Purple, Green, Red, Yellow;
Graphics3D@
Transpose[mycolors, (Polygon[myVertices[[#]]] & /@ myFaceIndices)]
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f203963%2fcolor-the-polygons-in-polyhedrondata%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
faces = First@Normal@PolyhedronData["Dodecahedron", "Faces"];
colors = Table[ColorData[97, i], i, 12];
Graphics3D@Riffle[colors, faces]
$endgroup$
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
add a comment |
$begingroup$
faces = First@Normal@PolyhedronData["Dodecahedron", "Faces"];
colors = Table[ColorData[97, i], i, 12];
Graphics3D@Riffle[colors, faces]
$endgroup$
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
add a comment |
$begingroup$
faces = First@Normal@PolyhedronData["Dodecahedron", "Faces"];
colors = Table[ColorData[97, i], i, 12];
Graphics3D@Riffle[colors, faces]
$endgroup$
faces = First@Normal@PolyhedronData["Dodecahedron", "Faces"];
colors = Table[ColorData[97, i], i, 12];
Graphics3D@Riffle[colors, faces]
answered 9 hours ago
C. E.C. E.
54.1k3 gold badges104 silver badges212 bronze badges
54.1k3 gold badges104 silver badges212 bronze badges
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
add a comment |
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
$begingroup$
Yep... short and sweet. Thanks. ($checkmark$)
$endgroup$
– David G. Stork
9 hours ago
add a comment |
$begingroup$
You can get the polygons directly using the property "Polygons"
:
polygons = PolyhedronData["Dodecahedron", "Polygons"];
colors = ColorData[97]/@Range[12];
Graphics3D[Transpose[colors, polygons]]
$endgroup$
add a comment |
$begingroup$
You can get the polygons directly using the property "Polygons"
:
polygons = PolyhedronData["Dodecahedron", "Polygons"];
colors = ColorData[97]/@Range[12];
Graphics3D[Transpose[colors, polygons]]
$endgroup$
add a comment |
$begingroup$
You can get the polygons directly using the property "Polygons"
:
polygons = PolyhedronData["Dodecahedron", "Polygons"];
colors = ColorData[97]/@Range[12];
Graphics3D[Transpose[colors, polygons]]
$endgroup$
You can get the polygons directly using the property "Polygons"
:
polygons = PolyhedronData["Dodecahedron", "Polygons"];
colors = ColorData[97]/@Range[12];
Graphics3D[Transpose[colors, polygons]]
answered 8 hours ago
kglrkglr
212k10 gold badges242 silver badges485 bronze badges
212k10 gold badges242 silver badges485 bronze badges
add a comment |
add a comment |
$begingroup$
This works, but could be improved:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
myFaceIndices = PolyhedronData["Dodecahedron", "Faces"];
mycolors = Red, Orange, Yellow, Green, Blue, Orange, Black, White,
Purple, Green, Red, Yellow;
Graphics3D@
Transpose[mycolors, (Polygon[myVertices[[#]]] & /@ myFaceIndices)]
$endgroup$
add a comment |
$begingroup$
This works, but could be improved:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
myFaceIndices = PolyhedronData["Dodecahedron", "Faces"];
mycolors = Red, Orange, Yellow, Green, Blue, Orange, Black, White,
Purple, Green, Red, Yellow;
Graphics3D@
Transpose[mycolors, (Polygon[myVertices[[#]]] & /@ myFaceIndices)]
$endgroup$
add a comment |
$begingroup$
This works, but could be improved:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
myFaceIndices = PolyhedronData["Dodecahedron", "Faces"];
mycolors = Red, Orange, Yellow, Green, Blue, Orange, Black, White,
Purple, Green, Red, Yellow;
Graphics3D@
Transpose[mycolors, (Polygon[myVertices[[#]]] & /@ myFaceIndices)]
$endgroup$
This works, but could be improved:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
myFaceIndices = PolyhedronData["Dodecahedron", "Faces"];
mycolors = Red, Orange, Yellow, Green, Blue, Orange, Black, White,
Purple, Green, Red, Yellow;
Graphics3D@
Transpose[mycolors, (Polygon[myVertices[[#]]] & /@ myFaceIndices)]
answered 9 hours ago
David G. StorkDavid G. Stork
26k2 gold badges23 silver badges58 bronze badges
26k2 gold badges23 silver badges58 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f203963%2fcolor-the-polygons-in-polyhedrondata%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown