Where "Color" (Material, Object, Vertex, Single, Random & Texture) from "Viewport Shading"? - blender

I have Blender 2.92. I looked at the documentation, there is no mention at all.
Screenshots:
2.8
2.9

Change Viewport Shading to solid

Related

Gnuplot - how to change the opacity of the key's background?

Is it possible to change the opacity of the key's background in gnuplot? I can only find the option to toggle between opaque or transparent.
Here is an example using python's matplotlib - https://matplotlib.org/3.2.0/_images/dflt_style_changes-14.png
This is possible in the development version (5.5) and in the most recent release version (5.4.2) but not in earlier versions.
set key box opaque fillcolor "0x7faaaaaa"
There is a cumbersome workaround for filling the key box with a custom color:
Set custom background color for key in Gnuplot.
However, it seems like semi-transparent colors are not accepted as terminal background.
Well, either you want to see the data and place the legend next to it
or you cover the data with the legend, then the data is not "important".
Putting a semi-transparent legend box on top of data seems to me a bit of a strange mix of both.
The only workaround I see currently is to manually place a semi-transparent box on top of the plot and behind the legend.
The only way I succeeded so far to get this into the right layer stacking order is to plot a box with boxxyerror and add the legend via keyentry. You can put the coordinates and size of the box e.g. into the datablock $myBox. A pretty ugly workaround, but I'm happy to learn about better solutions.
Code:
### manual workaround for semi-transparent fill of key box
reset session
set style fill solid 1.0
set key center at 0,-0 noautotitle box
$myBox <<EOD
0 -0 1.25 1.25
EOD
plot x w filledcurves x1 lc rgb 0xccff0000, \
-x w filledcurves x1 lc rgb 0xcc0000ff, \
$myBox u 1:2:3:4 w boxxy lc rgb 0x77ffffff noautoscale, \
keyentry w filledcurves x1 lc rgb 0xccff0000 ti "x" , \
keyentry w filledcurves x1 lc rgb 0xcc0000ff ti "-x"
### end of code
Result: (wxt terminal)

Cantilever Beam Height versus Deflection

I have a problem whereby in a LINEAR analysis, a cantilever is vertically bent through a tip load.
A parametric study is required between...
Change in Tip Deflection (dZ) versus Change in Beam Height (dH)
I want to see the SENESITIVITY is more at higher deflection values or vice versa. Thats to say, same height change brings more change in cantilever deflection for higher beam deflections ?
Best regards,
Rehan
The deflection of a cantilever beam subjected to a point load has a closed form solution.
δB = F L^3 / (3 E I)
It's not clear from your question if "height" means the beam thickness. If yes, substitute into the formula for I and take the derivative w.r.t. thickness to get the closed form solution.
It helps to know the answer before embarking on FEA.

Patches occupied by turtle shape in NetLogo

I would like a little bit of help with understanding and using patch shape and size vs origin. I am trying to mark the patches that are exactly under a specific turtle shape. For example, if the turtle is a rectangle of (w x h) I would like to change color or properties of all patches under that shape, not only at the origin patch. Of course, with a rectangle maybe I can manually color the patches under, but is there any option to modify patches under a more complicated turtle shape? Thank you.
Well there is a kludgey way to do this that has some artifacts of aliasing and other minor issues like transferring all visible objects (turtles, links, labels, drawing layer, etc) to the pcolor of a patch. But at least it's possible. It takes advantage of the included bitmap extension. Main idea is in paint-patches below.
extensions [bitmap]
to setup
clear-all
resize-world 0 199 0 199
set-patch-size 1
ask n-of 30 patches [ sprout 1 [set size 15]]
end
to paint-patches
let bmap bitmap:from-view
bitmap:copy-to-pcolors bmap true
ask turtles [ht] ; to show that the turtle shape is now painted to pcolors
end
That's impossible in NetLogo. Turtle shapes are purely visual. There's no way to access the exact contours of a turtle shape and then somehow use the contour as the basis for a computation.
If you're working with a small set of known shapes, like maybe square/triangle/circle, then you could handle each of the cases individually and write your own code to color patches corresponding to the shape. But if you need this capability in general, you're stuck.
You could write an extension to do it, but the extension would have to contain all original code to actually do the work of computing the overlap between the shape and the patch grid. There is no existing code inside NetLogo that does the computation you want.

opengl es 2.0 etc1 powervr SGX 540

I have a problem with ETC1 textures. To load ETC1 textures I use own code that load raw data of ETC1 image, then i use GL operation to load data into GPU memory GLES20.glCompressedTexImage2D(GLES20.GL_TEXTURE_2D, 0, 0x8D64, textureWidth, textureHeight, 0, rawSize, data);
but when device used PowerVR SGX540 GPU, only textures with dimension 512x512 draw correctly. And i don't understand why. OpenGL ES 2.0 standard says that I can use textures with non-power of two dimensions. Please help me to resolve my problem.
It is true that OpenGL ES 2.0 does not have the power of two restriction, however wrap modes and min filter are restricted. Please read the notes on http://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexParameter.xml
which states:
Similarly, if the width or height of a texture image are not powers of two and either the GL_TEXTURE_MIN_FILTER is set to one of the functions that requires mipmaps or the GL_TEXTURE_WRAP_S or GL_TEXTURE_WRAP_T is not set to GL_CLAMP_TO_EDGE, then the texture image unit will return (R, G, B, A) = (0, 0, 0, 1).
Also I recommend you to read the answer and comments on this question: Can OpenGL ES render textures of non base 2 dimensions?

Get resolution of bitmap from file vb .net

I have a filename that leads to a picture. It is not an embedded resource. My bitmap object always tells me the resolution is 96x96 no matter what, how can I get the actual resolution. Thanks
96 sounds pretty accurate to me. I think you're confusing pixel dimension with resolution.
Resolution is the number of dots per inch* (DPI), and 96 is a common number for graphics targeted at monitor display.
As mentioned, the Height and Width properties are probably what you're looking for.
*Note: technically, I should have said PPI, as dots and pixels aren't necessarily interchangeable.
The methods you are looking for are those :
Dim bmp as Bitmap = new Bitmap(IMAGE_NAME_LOCATION)
bmp.HorizontalResolution ' --> Horizontal PPI (points per inch)
bmp.VerticalResolution ' --> Vertical PPI
bmp.SetResolution ' --> Define both Horizontal and Vertical PPI
try this (its in C#):
Bitmap b = new Bitmap(IMAGE_NAME_LOCATION);
Size s = b.Size;
s.Height;
s.Width;
Height & width are in pixels. The Height & width are the original pic's size.
If you're loading a file using Bitmap.FromFile("C:\whatever.jpg"), and the resulting Bitmap has a .Width of 96 and a .Height of 96, then that is the actual resolution of that image.
If what you're doing is loading a file into a PictureBox control by setting its Image property in the designer (and browsing for the file), then it may be that your PictureBox just happens to be 96x96 and the SizeMode is set to Stretch, which would make any file you load appear to be 96x96.
It's simple:
Bitmaps don't contain resolution information. They are only an ordered collection of pixels. They're device-independent. You can show the same bitmap at different resolutions (pixels per inch) on two different devices.
The fact that your bitmap object has a resolution property is misleading.