Generate a 3 D list plot using the image data from a binarized size - 200 letter "w" as heights
ListPlot3D[
Reverse[
ImageData[
Binarize[Rasterize[Style["W", 200]]]]]]
Need to create this plot
but the result that I created is mismatching
Generate a 3 D list plot using the image data from a binarized size - 200 letter "w" as heights
ListPlot3D[
Reverse[
ImageData[
Binarize[Rasterize[Style["W", 200]]]]]]
Need to create this plot
but the result that I created is mismatching
If I understand correctly, it's the Mesh
that you want to match. Try this
ListPlot3D[ImageData[Binarize[Rasterize[Style["W", 200]]]],
Mesh -> 10]
It could be that your system is using a different font and thus your letter "W" looks different.
You can specify the FontFamily
as an Option
to Style
, see e.g.
ListPlot3D[ImageData[Binarize[Rasterize[Style["W", 200, FontFamily -> "Times"]]]]]
This produces the following plot
Based upon cvgmt's answer to Numbers in love
W =
RegionProduct[
DiscretizeGraphics[
Text[Style["W", FontFamily -> "Times"]], _Text,
MaxCellMeasure -> 0.1],
MeshRegion[{{0}, {3}}, Line[{1, 2}]]];
Graphics3D[{EdgeForm[], FaceForm[MaterialShading[{"Glazed", Red}]], W},
Background -> GrayLevel[0.5],
Boxed -> False,
ViewPoint -> {5, 5, 10},
ViewVertical -> {0, 1, 0},
Lighting -> "ThreePoint"]