filters – Calculating Lens Hood Dimensions

How can I calculate for a given lens, where in the periphery a theoretical lens hood would become visible?

This seems dependent on the size of the front element, focal length, and possibly other factors I don’t understand.

I build attachments for the front of my lenses to shoot through and selecting the appropriate lens has become challenge because I don’t understand this relationship. Thanks!

unity – OverlapBox() dimensions are huge but are fine when tested in isolation

To be completely transparent, I more-or-less copied this question from the Unity forums since I did not get a reply.

I’m creating this system where I’m placing level chunks together and I need to collect a list of colliders that have intersected with a particular level chunk. All of this is being done within one frame (A loop is controlling this placement). A chunk is composed of several colliders.

The way I am doing this is with an OverlapBox, copying the dimensions of a collider of a particular child GameObject (named area). This is done through the following function, being called from a control script. It’s meant to check for collisions that are happening within it, and return true when it’s intersecting something it shouldn’t.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CollisionCheck : MonoBehaviour
    public LayerMask m_LayerMask; //This is set to Everything in the editor

    public Collider() collidersTouched;

    public bool IsInappropriateTouchingHappening (GameObject allowedChunk)
        BoxCollider area = transform.Find("area").gameObject.GetComponent<BoxCollider>();
        collidersTouched = Physics.OverlapBox(, area.bounds.size/2, Quaternion.identity, m_LayerMask);

        Debug.Log("OverlapBox picked up this many colliders: " + collidersTouched.Length);

        foreach (Collider col in collidersTouched)
            Debug.Log("the collider in the obtained array: " + + col.gameObject.transform.position);
            if (!GameObject.ReferenceEquals( allowedChunk, col.gameObject) && !GameObject.ReferenceEquals( gameObject, col.gameObject))
                return true;
        return false;

    void OnDrawGizmos ()
        BoxCollider area = transform.Find("area").gameObject.GetComponent<BoxCollider>();
        Gizmos.matrix = Matrix4x4.TRS(, Quaternion.identity, area.bounds.size);
        Gizmos.color =;

It tells me that it’s picked up pretty much every collider in the scene! However, when I perform an isolated test using one of the chunks that the system is using, everything checks out. Here’s the code for the script I’m using for said test. It’s a modified version of what’s in Unity’s documentation forOverlapBox.

using UnityEngine;

public class OverlapBoxExample : MonoBehaviour
    bool m_Started;
    public LayerMask m_LayerMask;

    void Start()
        m_Started = true;

    void FixedUpdate()

    void MyCollisions()
        BoxCollider area = transform.Find("area").gameObject.GetComponent<BoxCollider>();
        Collider() hitColliders = Physics.OverlapBox(, area.bounds.size/2, Quaternion.identity, m_LayerMask);
        Debug.Log("Number of colliders hit in test: " + hitColliders.Length);

    //Draw the Box Overlap as a gizmo to show where it currently is testing. Click the Gizmos button to see this
    void OnDrawGizmos()
        BoxCollider area = transform.Find("area").gameObject.GetComponent<BoxCollider>();

        Gizmos.matrix = Matrix4x4.TRS(, Quaternion.identity, area.bounds.size);
        Gizmos.color = Color.yellow;

The gizmo in this second script is showing me the volume of the OverlapBox correctly, but in the first script, it’s not.

Does anyone have any ideas? I cannot imagine what makes the two boxes different, aside from the OverlapBoxExample script performing its OverlapBox() inside FixedUpdate instead of frame 1 like it does in my implementation. I don’t know why that would affect the size, however.

To recap, the whole issue is that the I’m attempting to create in the first script is inexplicably large. Also, Both the test and the implementations’ gizmos show the volume/position of the OverlapBox I want. Please let me know if more information is needed.

How to create a matrix with n*n dimensions which is not an exact number?

This type of n-by-n matrix can be created with SparseArray and Band.

n = 4;
a = SparseArray({Band({1, 2}) -> 1,
  Band({n, 1}, Automatic, {0, 1}) ->
    ToExpression@Table("-(Alpha)" <> ToString(i - 1), {i, n})},
  {n, n});



$$left (
begin {array} {cccc} 0 & 1 & 0 & 0 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 &
1 \ – text {$alpha $0} & – text {$alpha $1} & – text {$alpha $2} & – text {$alpha $3} \end {array} right)$$

8 – How can I allow users to specify image dimensions in CKEditor

I have a use case where content editors have a requirement to specify the height and the width of an image in the image properties. Sticking to styles is not possible because $reasons.

The CKEditor demo has this:

CKEditor demo with dimensions option

But the Drupal 8 image properties looks rather sparse in comparison.

Drupal 8 image properties

I’ve looked all over for this for hours, and this is the first time I’ve had to write my own Drupal Answers question!

Does anyone know how we can expose the option to set width and height in CKEditor?

I’m aware of IMCE – but expected behaviour of the module in Drupal 8 is to use IMCE for file upload only – once an image is placed, image properties is handled by CKEditor.

There is a YouTube video where someone has managed to configure CKEditor to use IMCE’s image properties: but there’s no instructions on how this was achieved, and a comment-or asked but has been hanging for a year.

I’m totally new to Drupal 8, would like to know how to do this! And then I’ll figure out how to make sure the change isn’t reverted next time core is patched :]

integration – Dirac Delta in two dimensions

I would like to compute the following two dimensional integral :
$$intint f(vec{x})delta(mid vec{x}mid -v)dvec{x}$$
$$f(vec{v})=Bigg(frac{m}{2pi k_BT}Bigg)^{3/2}exp{Big(frac{-mv^2}{2k_BT}Big)}$$
where $f$ is a smooth function.
I absolutely don’t know how to deal with such integrals, and I don’t have any knowledge (expect the defintion) of the Dirac Delta function in higher dimensions.

website design – Standard headshot and thumbnail dimensions and width/height ratio

Is there a preferred size and ratio for images that represent a headshot/mugshot of a person? I have a project where we’re taking photos of people, generate thumbnails, store the thumbnails and print them on identification cards. Those cards can be swiped by a computer and the photo pops up in a little notification window.

So is there a preferred or standard photo size / ratio for printing on identification cards (drivers licenses, passports, Costco cards)? Also, is there a preferred or standard size / ratio for headshots of people in web or Windows-based UIs?

An example might be a “Meet the Executive Team” section of a website that has executive headshots.

I know some places will do square headshots (StackExchange @ 128x128px), I would prefer a slightly more vertical headshot, but I’m not too picky either way. If there were any standards in this area, it would be great to know what the recommended Square headshot, vertical, or (if this exists) a horizontal image layout dimensions and ratio is.

abstract algebra – Exterior product and parallelograms with vector spaces with more than 5 dimensions

I am going over the exterior product.
Often, the example of parallelograms is given to give a concrete representation of 2-vectors as the exterior product of two 1-vectors. The question I have is this: Can the parallelogram representation work when the dimension n of the 1-vector space is greater than 5? Here’s what I am thinking: The 2-vector space dimension is n!/(2!(n-2)!). In order to find two 1-vectors whose product is a given 2-vector, I have 2n degrees of freedom to satisfy n!/(2!(n-2)!) constraints. When n>5 I have more constraints that degrees of freedom. Therefore, it would seem that the parallelogram representation can work only if the underlying vector space has less than 6 dimensions. Am I correct, or am I missing something?

calculus and analysis – How to use dimensions to analyze physical equations in polar coordinates

I already know that the geometric equation of an elastic body in polar coordinates is as follows:

&varepsilon_{rho}=frac{partial u_{rho}}{partial rho} quad \
&varepsilon_{theta}=frac{u_{rho}}{rho}+frac{1}{rho} frac{partial u_{theta}}{partial theta} quad\
&gamma_{rho theta}=-frac{u_{theta}}{rho}+frac{partial u_{theta}}{partial rho}+frac{1}{rho} frac{partial u_{rho}}{partial theta} quad

I find that in $gamma_{rho theta}$ there is a coefficient $frac{1}{rho}$ in front of $frac{partial u_{rho}}{partial theta}$ and not in front of $frac{partial u_{theta}}{partial rho}$.

I want to use MMA to analyze the dimensions of items, such as $frac{partial u_{theta}}{partial rho}$, $varepsilon_{rho}$, $frac{partial u_{rho}}{partial theta}$.