Simulate the appearance of a plane illuminated by a nearby point source












10












$begingroup$


I'd like to simulate the appearance of a diffusely reflecting plane surface illuminated by a nearby point source.



Graphics3D[{Lighting -> {{"Point", White, {0, 0, 1}}},
FaceForm[White],
Polygon[
{{-10, -10, 0},
{-10, 10, 0},
{10, 10, 0},
{10, -10, 0},
{-10, -10, 0}}]},
PlotRange -> {{-10, 10}, {-10, 10}, {0, 10}},
Axes -> True,
AxesLabel -> {"x", "y", "z"}]


plane illuminated by point source



Notice that the sole point source is at {0,0,1}, just above the surface at its center. What should appear is that the center of the plane should appear bright (because it is near the source just above the center, and for geometric reasons) while the edges (distant portions) of the plane should appear dark. That doesn't happen.



I've adjusted properties of the specularity and such, never able to get the expected bright region in the center.










share|improve this question











$endgroup$








  • 1




    $begingroup$
    Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
    $endgroup$
    – Thies Heidecke
    Mar 17 at 23:49












  • $begingroup$
    OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
    $endgroup$
    – David G. Stork
    Mar 17 at 23:50






  • 2




    $begingroup$
    The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
    $endgroup$
    – C. E.
    Mar 18 at 5:34












  • $begingroup$
    Ah... yes... attenuation. Thanks. I will try that tomorrow.
    $endgroup$
    – David G. Stork
    Mar 18 at 5:45
















10












$begingroup$


I'd like to simulate the appearance of a diffusely reflecting plane surface illuminated by a nearby point source.



Graphics3D[{Lighting -> {{"Point", White, {0, 0, 1}}},
FaceForm[White],
Polygon[
{{-10, -10, 0},
{-10, 10, 0},
{10, 10, 0},
{10, -10, 0},
{-10, -10, 0}}]},
PlotRange -> {{-10, 10}, {-10, 10}, {0, 10}},
Axes -> True,
AxesLabel -> {"x", "y", "z"}]


plane illuminated by point source



Notice that the sole point source is at {0,0,1}, just above the surface at its center. What should appear is that the center of the plane should appear bright (because it is near the source just above the center, and for geometric reasons) while the edges (distant portions) of the plane should appear dark. That doesn't happen.



I've adjusted properties of the specularity and such, never able to get the expected bright region in the center.










share|improve this question











$endgroup$








  • 1




    $begingroup$
    Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
    $endgroup$
    – Thies Heidecke
    Mar 17 at 23:49












  • $begingroup$
    OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
    $endgroup$
    – David G. Stork
    Mar 17 at 23:50






  • 2




    $begingroup$
    The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
    $endgroup$
    – C. E.
    Mar 18 at 5:34












  • $begingroup$
    Ah... yes... attenuation. Thanks. I will try that tomorrow.
    $endgroup$
    – David G. Stork
    Mar 18 at 5:45














10












10








10


1



$begingroup$


I'd like to simulate the appearance of a diffusely reflecting plane surface illuminated by a nearby point source.



Graphics3D[{Lighting -> {{"Point", White, {0, 0, 1}}},
FaceForm[White],
Polygon[
{{-10, -10, 0},
{-10, 10, 0},
{10, 10, 0},
{10, -10, 0},
{-10, -10, 0}}]},
PlotRange -> {{-10, 10}, {-10, 10}, {0, 10}},
Axes -> True,
AxesLabel -> {"x", "y", "z"}]


plane illuminated by point source



Notice that the sole point source is at {0,0,1}, just above the surface at its center. What should appear is that the center of the plane should appear bright (because it is near the source just above the center, and for geometric reasons) while the edges (distant portions) of the plane should appear dark. That doesn't happen.



I've adjusted properties of the specularity and such, never able to get the expected bright region in the center.










share|improve this question











$endgroup$




I'd like to simulate the appearance of a diffusely reflecting plane surface illuminated by a nearby point source.



Graphics3D[{Lighting -> {{"Point", White, {0, 0, 1}}},
FaceForm[White],
Polygon[
{{-10, -10, 0},
{-10, 10, 0},
{10, 10, 0},
{10, -10, 0},
{-10, -10, 0}}]},
PlotRange -> {{-10, 10}, {-10, 10}, {0, 10}},
Axes -> True,
AxesLabel -> {"x", "y", "z"}]


plane illuminated by point source



Notice that the sole point source is at {0,0,1}, just above the surface at its center. What should appear is that the center of the plane should appear bright (because it is near the source just above the center, and for geometric reasons) while the edges (distant portions) of the plane should appear dark. That doesn't happen.



I've adjusted properties of the specularity and such, never able to get the expected bright region in the center.







graphics3d lighting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 18 at 16:30







David G. Stork

















asked Mar 17 at 23:35









David G. StorkDavid G. Stork

24.8k22155




24.8k22155








  • 1




    $begingroup$
    Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
    $endgroup$
    – Thies Heidecke
    Mar 17 at 23:49












  • $begingroup$
    OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
    $endgroup$
    – David G. Stork
    Mar 17 at 23:50






  • 2




    $begingroup$
    The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
    $endgroup$
    – C. E.
    Mar 18 at 5:34












  • $begingroup$
    Ah... yes... attenuation. Thanks. I will try that tomorrow.
    $endgroup$
    – David G. Stork
    Mar 18 at 5:45














  • 1




    $begingroup$
    Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
    $endgroup$
    – Thies Heidecke
    Mar 17 at 23:49












  • $begingroup$
    OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
    $endgroup$
    – David G. Stork
    Mar 17 at 23:50






  • 2




    $begingroup$
    The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
    $endgroup$
    – C. E.
    Mar 18 at 5:34












  • $begingroup$
    Ah... yes... attenuation. Thanks. I will try that tomorrow.
    $endgroup$
    – David G. Stork
    Mar 18 at 5:45








1




1




$begingroup$
Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
$endgroup$
– Thies Heidecke
Mar 17 at 23:49






$begingroup$
Ideally you shouldn't need the Specularity part, since this will add a glossy surface lighting (probably Phong or something similar) which creates the brightest highlight on the plane where you could see the light source (if it had an extent) mirrored instead of where the distance is closest to the surface as with diffuse lighting. I couldn't get it working with only diffuse lighting, but i think that's more at the heart of the issue.
$endgroup$
– Thies Heidecke
Mar 17 at 23:49














$begingroup$
OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
$endgroup$
– David G. Stork
Mar 17 at 23:50




$begingroup$
OK... so I'll resimulate with the specularity eliminated and re-post. Thanks.
$endgroup$
– David G. Stork
Mar 17 at 23:50




2




2




$begingroup$
The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
$endgroup$
– C. E.
Mar 18 at 5:34






$begingroup$
The documentation says that light from point sources does not attenuate with distance (without using the fourth list element). Without attenuation, I don't think you would expect to see the bright spot in the middle. If you were to place other objects blocking the light, then those would cast shadows, showing that there is a point source just as there should be. I don't have much time right now, my initial attempt with attenuation did not succeed, however. Also, the figure you posted no longer matches the code.
$endgroup$
– C. E.
Mar 18 at 5:34














$begingroup$
Ah... yes... attenuation. Thanks. I will try that tomorrow.
$endgroup$
– David G. Stork
Mar 18 at 5:45




$begingroup$
Ah... yes... attenuation. Thanks. I will try that tomorrow.
$endgroup$
– David G. Stork
Mar 18 at 5:45










2 Answers
2






active

oldest

votes


















11












$begingroup$

Thanks to @C.E., who set me on the right path:



plane = DiscretizeRegion[
InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}],
{{-1, 1}, {-1, 1}, {0, 1}},
MaxCellMeasure -> {"Length" -> 0.01},
BaseStyle -> {EdgeForm, White}];
Show[plane,
Lighting -> {{"Point", White, {0, 0, 2}, {0, 0, 1}}}]


enter image description here



There's more code and coloring, but this is the ultimate figure I needed:



enter image description here



I realize why trying to render a single plane will not work: Mathematica's routines render the entire plane with a single FaceForm, so you must break a plane into small areas, each of which can be rendered a different color/brightness. This is also why rendering a sphere is unproblematic—it consists of lots of small planes.






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
    $endgroup$
    – kglr
    Mar 18 at 7:14



















1












$begingroup$

It seems that the viewpoint direction has a lot to do with it. Here is an example, similar to yours that emphasizes the point:



n = 6; th = (2 [Pi])/n Range[n + 1];
p = Polygon[Transpose[{Cos[th], Sin[th], ConstantArray[0, n + 1]}]];
g = Graphics3D[{Specularity[White, 10], Lighting -> {{"Point", White, {0, 0, 2}}},
FaceForm[Blue], p}]


Now, rotate the viewpoint so that you are looking directly down towards the center of the hexagon,



Show[%, Viewpoint -> {0, -[Infinity], 0}] 


(I am a bit surprised that the y-coordinate is non-zero, not the z-coordinate)



and then perturb it a little ...






share|improve this answer











$endgroup$













  • $begingroup$
    This answer was in response to the original posting, with specularity.
    $endgroup$
    – mjw
    Mar 18 at 0:20






  • 1




    $begingroup$
    Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:27










  • $begingroup$
    Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
    $endgroup$
    – mjw
    Mar 18 at 0:30










  • $begingroup$
    But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:32






  • 1




    $begingroup$
    Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:35













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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193463%2fsimulate-the-appearance-of-a-plane-illuminated-by-a-nearby-point-source%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









11












$begingroup$

Thanks to @C.E., who set me on the right path:



plane = DiscretizeRegion[
InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}],
{{-1, 1}, {-1, 1}, {0, 1}},
MaxCellMeasure -> {"Length" -> 0.01},
BaseStyle -> {EdgeForm, White}];
Show[plane,
Lighting -> {{"Point", White, {0, 0, 2}, {0, 0, 1}}}]


enter image description here



There's more code and coloring, but this is the ultimate figure I needed:



enter image description here



I realize why trying to render a single plane will not work: Mathematica's routines render the entire plane with a single FaceForm, so you must break a plane into small areas, each of which can be rendered a different color/brightness. This is also why rendering a sphere is unproblematic—it consists of lots of small planes.






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
    $endgroup$
    – kglr
    Mar 18 at 7:14
















11












$begingroup$

Thanks to @C.E., who set me on the right path:



plane = DiscretizeRegion[
InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}],
{{-1, 1}, {-1, 1}, {0, 1}},
MaxCellMeasure -> {"Length" -> 0.01},
BaseStyle -> {EdgeForm, White}];
Show[plane,
Lighting -> {{"Point", White, {0, 0, 2}, {0, 0, 1}}}]


enter image description here



There's more code and coloring, but this is the ultimate figure I needed:



enter image description here



I realize why trying to render a single plane will not work: Mathematica's routines render the entire plane with a single FaceForm, so you must break a plane into small areas, each of which can be rendered a different color/brightness. This is also why rendering a sphere is unproblematic—it consists of lots of small planes.






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
    $endgroup$
    – kglr
    Mar 18 at 7:14














11












11








11





$begingroup$

Thanks to @C.E., who set me on the right path:



plane = DiscretizeRegion[
InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}],
{{-1, 1}, {-1, 1}, {0, 1}},
MaxCellMeasure -> {"Length" -> 0.01},
BaseStyle -> {EdgeForm, White}];
Show[plane,
Lighting -> {{"Point", White, {0, 0, 2}, {0, 0, 1}}}]


enter image description here



There's more code and coloring, but this is the ultimate figure I needed:



enter image description here



I realize why trying to render a single plane will not work: Mathematica's routines render the entire plane with a single FaceForm, so you must break a plane into small areas, each of which can be rendered a different color/brightness. This is also why rendering a sphere is unproblematic—it consists of lots of small planes.






share|improve this answer











$endgroup$



Thanks to @C.E., who set me on the right path:



plane = DiscretizeRegion[
InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}],
{{-1, 1}, {-1, 1}, {0, 1}},
MaxCellMeasure -> {"Length" -> 0.01},
BaseStyle -> {EdgeForm, White}];
Show[plane,
Lighting -> {{"Point", White, {0, 0, 2}, {0, 0, 1}}}]


enter image description here



There's more code and coloring, but this is the ultimate figure I needed:



enter image description here



I realize why trying to render a single plane will not work: Mathematica's routines render the entire plane with a single FaceForm, so you must break a plane into small areas, each of which can be rendered a different color/brightness. This is also why rendering a sphere is unproblematic—it consists of lots of small planes.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 18 at 16:25

























answered Mar 18 at 6:10









David G. StorkDavid G. Stork

24.8k22155




24.8k22155








  • 1




    $begingroup$
    You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
    $endgroup$
    – kglr
    Mar 18 at 7:14














  • 1




    $begingroup$
    You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
    $endgroup$
    – kglr
    Mar 18 at 7:14








1




1




$begingroup$
You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
$endgroup$
– kglr
Mar 18 at 7:14




$begingroup$
You can add the Lighting->... option to BaseStyle in DiscretizeRegion.
$endgroup$
– kglr
Mar 18 at 7:14











1












$begingroup$

It seems that the viewpoint direction has a lot to do with it. Here is an example, similar to yours that emphasizes the point:



n = 6; th = (2 [Pi])/n Range[n + 1];
p = Polygon[Transpose[{Cos[th], Sin[th], ConstantArray[0, n + 1]}]];
g = Graphics3D[{Specularity[White, 10], Lighting -> {{"Point", White, {0, 0, 2}}},
FaceForm[Blue], p}]


Now, rotate the viewpoint so that you are looking directly down towards the center of the hexagon,



Show[%, Viewpoint -> {0, -[Infinity], 0}] 


(I am a bit surprised that the y-coordinate is non-zero, not the z-coordinate)



and then perturb it a little ...






share|improve this answer











$endgroup$













  • $begingroup$
    This answer was in response to the original posting, with specularity.
    $endgroup$
    – mjw
    Mar 18 at 0:20






  • 1




    $begingroup$
    Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:27










  • $begingroup$
    Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
    $endgroup$
    – mjw
    Mar 18 at 0:30










  • $begingroup$
    But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:32






  • 1




    $begingroup$
    Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:35


















1












$begingroup$

It seems that the viewpoint direction has a lot to do with it. Here is an example, similar to yours that emphasizes the point:



n = 6; th = (2 [Pi])/n Range[n + 1];
p = Polygon[Transpose[{Cos[th], Sin[th], ConstantArray[0, n + 1]}]];
g = Graphics3D[{Specularity[White, 10], Lighting -> {{"Point", White, {0, 0, 2}}},
FaceForm[Blue], p}]


Now, rotate the viewpoint so that you are looking directly down towards the center of the hexagon,



Show[%, Viewpoint -> {0, -[Infinity], 0}] 


(I am a bit surprised that the y-coordinate is non-zero, not the z-coordinate)



and then perturb it a little ...






share|improve this answer











$endgroup$













  • $begingroup$
    This answer was in response to the original posting, with specularity.
    $endgroup$
    – mjw
    Mar 18 at 0:20






  • 1




    $begingroup$
    Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:27










  • $begingroup$
    Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
    $endgroup$
    – mjw
    Mar 18 at 0:30










  • $begingroup$
    But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:32






  • 1




    $begingroup$
    Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:35
















1












1








1





$begingroup$

It seems that the viewpoint direction has a lot to do with it. Here is an example, similar to yours that emphasizes the point:



n = 6; th = (2 [Pi])/n Range[n + 1];
p = Polygon[Transpose[{Cos[th], Sin[th], ConstantArray[0, n + 1]}]];
g = Graphics3D[{Specularity[White, 10], Lighting -> {{"Point", White, {0, 0, 2}}},
FaceForm[Blue], p}]


Now, rotate the viewpoint so that you are looking directly down towards the center of the hexagon,



Show[%, Viewpoint -> {0, -[Infinity], 0}] 


(I am a bit surprised that the y-coordinate is non-zero, not the z-coordinate)



and then perturb it a little ...






share|improve this answer











$endgroup$



It seems that the viewpoint direction has a lot to do with it. Here is an example, similar to yours that emphasizes the point:



n = 6; th = (2 [Pi])/n Range[n + 1];
p = Polygon[Transpose[{Cos[th], Sin[th], ConstantArray[0, n + 1]}]];
g = Graphics3D[{Specularity[White, 10], Lighting -> {{"Point", White, {0, 0, 2}}},
FaceForm[Blue], p}]


Now, rotate the viewpoint so that you are looking directly down towards the center of the hexagon,



Show[%, Viewpoint -> {0, -[Infinity], 0}] 


(I am a bit surprised that the y-coordinate is non-zero, not the z-coordinate)



and then perturb it a little ...







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 18 at 0:27

























answered Mar 18 at 0:16









mjwmjw

1,05110




1,05110












  • $begingroup$
    This answer was in response to the original posting, with specularity.
    $endgroup$
    – mjw
    Mar 18 at 0:20






  • 1




    $begingroup$
    Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:27










  • $begingroup$
    Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
    $endgroup$
    – mjw
    Mar 18 at 0:30










  • $begingroup$
    But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:32






  • 1




    $begingroup$
    Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:35




















  • $begingroup$
    This answer was in response to the original posting, with specularity.
    $endgroup$
    – mjw
    Mar 18 at 0:20






  • 1




    $begingroup$
    Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:27










  • $begingroup$
    Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
    $endgroup$
    – mjw
    Mar 18 at 0:30










  • $begingroup$
    But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:32






  • 1




    $begingroup$
    Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
    $endgroup$
    – David G. Stork
    Mar 18 at 0:35


















$begingroup$
This answer was in response to the original posting, with specularity.
$endgroup$
– mjw
Mar 18 at 0:20




$begingroup$
This answer was in response to the original posting, with specularity.
$endgroup$
– mjw
Mar 18 at 0:20




1




1




$begingroup$
Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
$endgroup$
– David G. Stork
Mar 18 at 0:27




$begingroup$
Yes... but even with everything adjusted, your code apparently cannot yield the bright center region we know must occur. Thanks, though.
$endgroup$
– David G. Stork
Mar 18 at 0:27












$begingroup$
Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
$endgroup$
– mjw
Mar 18 at 0:30




$begingroup$
Changing Lighting -> {{"Point", White, {0, 0, 2}} to Lighting -> {{"Point", White, {0, 0, 20}} turns it up pretty bright.
$endgroup$
– mjw
Mar 18 at 0:30












$begingroup$
But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
$endgroup$
– David G. Stork
Mar 18 at 0:32




$begingroup$
But placing the source point far from the surface is precisely what we shouldn't do. Even if it makes the overall image bright, it fails to give a large difference in brightness between the center and the edge.
$endgroup$
– David G. Stork
Mar 18 at 0:32




1




1




$begingroup$
Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
$endgroup$
– David G. Stork
Mar 18 at 0:35






$begingroup$
Hold a candle near your carpeted (Lambertian) floor in an otherwise dark room. THAT is what I'm trying to simulate. The sphere specularity is particularly effective when there is specular ("mirror-like") reflection from the surface—precisely what I want to avoid. And I certainly don't want to use a cylindrical or other baffle, which thwarts the physical phenomenon in question.
$endgroup$
– David G. Stork
Mar 18 at 0:35




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193463%2fsimulate-the-appearance-of-a-plane-illuminated-by-a-nearby-point-source%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?