Wireframe of a Hexahedron using Graphics3D?
Are there options in Graphics3D
that would allow me to set the face color of a Hexahedron
to None
or make the faces transparent?
I did try FaceForm
. But this may not work with Graphics3D
primitives (or I am using it incorrectly).
I have the following code:
hexCoordinates = {{-12.5, -10,-6},{-12.5,10,6},{12.5,10,6},12.5,-10,6},{-6.5,-4,0}, {-6.5,4,0},{6.5,4,0},{6.5,-4,0}};
hexShape := Hexahedron[hexCoordinates];
Graphics3D[hexShape, Axes->True, FaceGrids->All, ImageSize->Full, Lighting->{{"Ambient",None}}]
graphics3d
add a comment |
Are there options in Graphics3D
that would allow me to set the face color of a Hexahedron
to None
or make the faces transparent?
I did try FaceForm
. But this may not work with Graphics3D
primitives (or I am using it incorrectly).
I have the following code:
hexCoordinates = {{-12.5, -10,-6},{-12.5,10,6},{12.5,10,6},12.5,-10,6},{-6.5,-4,0}, {-6.5,4,0},{6.5,4,0},{6.5,-4,0}};
hexShape := Hexahedron[hexCoordinates];
Graphics3D[hexShape, Axes->True, FaceGrids->All, ImageSize->Full, Lighting->{{"Ambient",None}}]
graphics3d
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:Graphics3D[{FaceForm@None, Hexahedron}]
.
– Kuba♦
Dec 11 '18 at 13:30
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17
add a comment |
Are there options in Graphics3D
that would allow me to set the face color of a Hexahedron
to None
or make the faces transparent?
I did try FaceForm
. But this may not work with Graphics3D
primitives (or I am using it incorrectly).
I have the following code:
hexCoordinates = {{-12.5, -10,-6},{-12.5,10,6},{12.5,10,6},12.5,-10,6},{-6.5,-4,0}, {-6.5,4,0},{6.5,4,0},{6.5,-4,0}};
hexShape := Hexahedron[hexCoordinates];
Graphics3D[hexShape, Axes->True, FaceGrids->All, ImageSize->Full, Lighting->{{"Ambient",None}}]
graphics3d
Are there options in Graphics3D
that would allow me to set the face color of a Hexahedron
to None
or make the faces transparent?
I did try FaceForm
. But this may not work with Graphics3D
primitives (or I am using it incorrectly).
I have the following code:
hexCoordinates = {{-12.5, -10,-6},{-12.5,10,6},{12.5,10,6},12.5,-10,6},{-6.5,-4,0}, {-6.5,4,0},{6.5,4,0},{6.5,-4,0}};
hexShape := Hexahedron[hexCoordinates];
Graphics3D[hexShape, Axes->True, FaceGrids->All, ImageSize->Full, Lighting->{{"Ambient",None}}]
graphics3d
graphics3d
edited Dec 11 '18 at 14:13
asked Dec 11 '18 at 13:24
Doug Kimzey
924615
924615
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:Graphics3D[{FaceForm@None, Hexahedron}]
.
– Kuba♦
Dec 11 '18 at 13:30
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17
add a comment |
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:Graphics3D[{FaceForm@None, Hexahedron}]
.
– Kuba♦
Dec 11 '18 at 13:30
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:
Graphics3D[{FaceForm@None, Hexahedron}]
.– Kuba♦
Dec 11 '18 at 13:30
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:
Graphics3D[{FaceForm@None, Hexahedron}]
.– Kuba♦
Dec 11 '18 at 13:30
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17
add a comment |
1 Answer
1
active
oldest
votes
I gues the solution is FaceForm
.
Graphics3D[{
{Ball[{1, 1, 1}/2, 1/5]},
{FaceForm, EdgeForm[{Thick, Blue}], Hexahedron}
},
FaceGrids -> All,
Axes -> True,
Boxed -> False
]
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between theFaceGrids
andFaceForm
directives: i.stack.imgur.com/8Cdv0.png
– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of{}
.
– Kuba♦
Dec 11 '18 at 14:56
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
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%2f187700%2fwireframe-of-a-hexahedron-using-graphics3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I gues the solution is FaceForm
.
Graphics3D[{
{Ball[{1, 1, 1}/2, 1/5]},
{FaceForm, EdgeForm[{Thick, Blue}], Hexahedron}
},
FaceGrids -> All,
Axes -> True,
Boxed -> False
]
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between theFaceGrids
andFaceForm
directives: i.stack.imgur.com/8Cdv0.png
– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of{}
.
– Kuba♦
Dec 11 '18 at 14:56
|
show 3 more comments
I gues the solution is FaceForm
.
Graphics3D[{
{Ball[{1, 1, 1}/2, 1/5]},
{FaceForm, EdgeForm[{Thick, Blue}], Hexahedron}
},
FaceGrids -> All,
Axes -> True,
Boxed -> False
]
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between theFaceGrids
andFaceForm
directives: i.stack.imgur.com/8Cdv0.png
– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of{}
.
– Kuba♦
Dec 11 '18 at 14:56
|
show 3 more comments
I gues the solution is FaceForm
.
Graphics3D[{
{Ball[{1, 1, 1}/2, 1/5]},
{FaceForm, EdgeForm[{Thick, Blue}], Hexahedron}
},
FaceGrids -> All,
Axes -> True,
Boxed -> False
]
I gues the solution is FaceForm
.
Graphics3D[{
{Ball[{1, 1, 1}/2, 1/5]},
{FaceForm, EdgeForm[{Thick, Blue}], Hexahedron}
},
FaceGrids -> All,
Axes -> True,
Boxed -> False
]
edited Dec 11 '18 at 14:45
answered Dec 11 '18 at 14:08
Pinti
3,2151833
3,2151833
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between theFaceGrids
andFaceForm
directives: i.stack.imgur.com/8Cdv0.png
– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of{}
.
– Kuba♦
Dec 11 '18 at 14:56
|
show 3 more comments
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between theFaceGrids
andFaceForm
directives: i.stack.imgur.com/8Cdv0.png
– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of{}
.
– Kuba♦
Dec 11 '18 at 14:56
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
This works if you don't need FaceGrids->All. It looks like FaceForm causes FaceGrids and Axes to be ignored. I am wondering if there is a way to have FaceForms with Axes->True and FaceGrids->All.
– Doug Kimzey
Dec 11 '18 at 14:28
@DougKimzey I don't get interference between the
FaceGrids
and FaceForm
directives: i.stack.imgur.com/8Cdv0.png– Jason B.
Dec 11 '18 at 14:41
@DougKimzey I don't get interference between the
FaceGrids
and FaceForm
directives: i.stack.imgur.com/8Cdv0.png– Jason B.
Dec 11 '18 at 14:41
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
@DougKimzey are you sure you are following syntax from documentation? E.g. how did you end up with FaceForm in options in the first place. Now, what is the code you are descirbing above?
– Kuba♦
Dec 11 '18 at 14:43
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
If I use: Graphics3D[hexShape, FaceForm, Axes->True, FaceGrids->All], the axes and grids appear but the hexahedron is solid. An error message appears: "An improperly formatted option was encountered..." If I use Graphics3D[{{hexShape, FaceForm, Axes->True, FaceGrids->All}}] FaceForm, Axes and FaceGrids are ignored.
– Doug Kimzey
Dec 11 '18 at 14:47
1
1
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of
{}
.– Kuba♦
Dec 11 '18 at 14:56
@DougKimzey yes. take a look at graphics3d docs. Options should be outside of
{}
.– Kuba♦
Dec 11 '18 at 14:56
|
show 3 more comments
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f187700%2fwireframe-of-a-hexahedron-using-graphics3d%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
Quit the kernel and run the code from this question. Then fix the code and update the question. Also, what did you try with FaceForm? It seems to work:
Graphics3D[{FaceForm@None, Hexahedron}]
.– Kuba♦
Dec 11 '18 at 13:30
Thanks for the catch. I tried FaceForm in the options list but received an error: "An improperly formatted option was encountered while reading a Graphics".
– Doug Kimzey
Dec 11 '18 at 14:17