Consider I have N dynamic points on my Scene, I would like to "frame" all them, with my Camera.    How can i calculate (at runtime) Vector3 Position to correctly frame all my scene ?   This is my idea:   Calculate Avarage for all my points Move my Camera "up" / Zoom out to correctly "frame" all my points (i don't know how to calculate ) Use Unity LookAt(myAvaragePoint)   I think i've to use some trigonometryc function to calculate the Y Camera position (to zoom in, zoom out), but i don't know which!  Thanks
Consider I have N dynamic points on my Scene, I would like to "frame" all them, with my Camera.    How can i calculate (at runtime) Vector3 Position to correctly frame all my scene ?   This is my idea:    Calculate Avarage for all my points  Move my Camera "up" to correctly "frame" all my points  (i don't know how) Use Unity LookAt(myAvaragePoint)   Thanks
When using find, how do I return the file name and the line number when searching for a string? I manage to return the file name in one command and the line numbers with another one, but I can't seem to combine them.  File names: find . -type f -exec grep -l 'string to search' {} \;  Line numbers: find . -type f -exec grep -n 'string to search' {} \; How do I tokenize a string in C++? Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++? "I who has" vs "I who have." Possible Duplicate:          Am aware it is correct to say "I have written..." and "I am a doctor who has writen..."  I have, however, severally come across the sentence "I, Tertius, who have written...". Shouldn't it be "I, Tertius, who has written..."? How to find a point on a line at a given distance from a given point on the same line (given the equation of the line)? You are given a point P(x,y) on a line of equation ax + by + c = 0. I want another point, Q(a,b) on the same line which is at a distance d from P. There will be two points. I want to find both and know which side of P each one lies.  There are related questions in this forum, but I didn't get what I am exactly looking for. Sorry for beating around the bush, and thanks for any help... Please give me an elaborate explanation. Thanks once again!!! CSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners? Prove $\sum_{k = 0}^{n}(-1)^{n - k} \binom{n}{k} \cdot k^n = n!$ and $\sum_{k = 0}^{n}(-1)^{n - k} \binom{n}{k} \cdot k^m = 0$ Prove $$\sum_{k = 0}^{n}(-1)^{n - k} \binom{n}{k} \cdot k^n = n! \qquad\text{and}\qquad \sum_{k = 0}^{n}(-1)^{n - k} \binom{n}{k} \cdot k^m = 0,$$ where $m \in \{0, 1, 2, \cdots, n - 1\}$.  To be honest, I tried to use some combinatorial ideas but was not able to see interconnections. Also, I had an idea to prove it using induction but failed to do that either. Help will be much appreciated! I just got stuck and don't see any continuation of solution for this problem PDF video Embedding Problem Sensor for detecting airsoft bullet I'm trying to make airsoft chronograph/chronometer (a device that measures airsoft bullet speed). The idea is to measure time in which bullet is traveling from point A to point B, and then I can calculate bullet speed. Bullet is shot into plastic pipe with diameter of 32mm. I've tried to put on one side IR LED and on the other side phototransistor (BPW 40), both at the start and end of the tube. Something like this:  Blue circles are phototransistors, red circles are IR LEDs and white circles are airsoft bullets. When bullet passes through area where bullet 2  is drawn (just in between IR LED and phototransistor), everyting works perfectly. But when the bullet passes where bullets 1 and 3 are drawn, it isn't detected. That is expected, but unwanted behavior. So my question is: how can I detect bullets regardlessly of it's position ? I've thought about putting IR LEDs and phototransistors around the pipe (not only in one place), like this:  but this solution isn't cheapest: 5 IR LEDs + 5 BPW 40 = cca $12 times 2 (because I need it on both sides of the pipe) = $24. Is there any cheaper solution ? Is BPW 40 good choice for phototransistor ? I don't know which IR LEDs I'm using (and salesman in the store also doesn't know - he told me these are generic ones for remote controllers, like TV or DVD controller). Diameter of the pipe is 32mm and it will be long about 14cm (sensors will be 10cm apart). Diameter of airsoft bullet is 6mm. EDIT: I'll go for my second idea. I just have one more question: is it better to arrange IR emitters and photo transistors this way:  or this way:  Thanks !! Calculate sums of inverses of binomial coefficients Per-site Meta post didn't populate Moderator Inbox Per  I'm posting this issue.  I'm a moderator over on Sci-fi &amp; Fantasy.SE.  My moderator inbox missed :    The Meta Question in question should show up after the moderator message and before the new meta question, as it was posted on Jan 2 (it's currently Jan 6, so '2 days ago' is Jan 4). A toplogical space $X$ is said to be second countable   if there exists a countable basis for the topology.      $X$ is separable if there exist a countable dense subset.   Show that a second countable space always is separable.      Give an example of a space that is separable but not    second countable   The first part was easy and i managed to solve it on my own  Assume that $X$ is second countable and let $B_1, B_2, B_3...$ be a countable basis. Construct the set $A$ by taking one element $x_n$ out of every $B_n$. Then $A$ becomes dense because every open set $U$ contain a $B_n$ which in turn contain the element $x_n$ in $A$.    Again, like in the question i posted yesterday, i had trouble to come up with an example but our professor gave an example during the last lecture but i dont fully understand it:  "For an example of a separable but not second countable space let $X$ be the real line provided with the cofinite topology, i.e. where a set is open if its either empty or if its complement is finite.   Then every infinite set is dense and hence $X$ is separable.  But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  We asked him to explain it in more detail but his english is poor and nobody understood anything...:)       Def: A subset $A$ of a topological space $X$ is dense in $X$ if for any point $x$ in $X$, any neighborhood of $x$ contains at least one point from $A$.   $1.$ "Then every infinite set is dense"  Take $A$ to be one of these infinite sets. If $x \in A \subset X$ then it trivially fulfills the definition. But if we take a $x \not\in A$ why is it not possible to find a neighborhood in these finite sets that does not contain an element in $A$?  edit: its obvious if it is only open neighborhoods, open sets in the topology, but that is not specified in the definition.  $2.$ I am not fully understanding this either  "But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  Is it possible to express this in a simpler way? Why normal acceleration doesn't bring a change in speed? Suppose There's a particle of mass m moving with speed $v_{0}$, at certain moment a force starts acting on it (centripetal force) and it start uniform circular motion  Now every other reference states that centripetal force only brings about change only in direction  But plugging-in things in the equations paint a different picture  suppose  normal/centripetal acceleration = $A$  then $|v| = \sqrt{v_{0}^2+\frac{(A t)^2}{1}}$  we can certainly see that factor of $t$ will bring change in magnitude of velocity   Secondly, why the velocity is always tangential to the circle, but how can we mathematically show such? Intuitively for me if there's constant acceleration toward a certain then at some point of time, the body should 'slack' and fall toward the direction of acceleration   Here' a picture for a reference: How can I make realistic looking potions as handouts Keras CNN with low/constant accuracies Suppose your git history looks like this:  1 2 3 4 5  1–5 are separate revisions. You need to remove 3 while still keeping 1, 2, 4 and 5. How can this be done?  Is there an efficient method when there are hundreds of revisions after the one to be deleted? If I have $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f$ is onto and $f\circ f\circ f = f$, how can I prove that $f$ is bijective? I know that I only have to prove that it is 1-to-1 because I'm given the fact that it's onto, but how can I use the fact that $f\circ f\circ f=f$ to prove that it is 1-to-1?  Thanks! Erase Windows Vista to Install Ubuntu new here. I have an old E-machine which as Windows Vista on it and I want to erase the Windows Vista, and install Ubuntu on it instead, but I am not sure where to start. Can I first install Ubuntu, and THEN erase Windows Vista, or is there a more sure method? I appreciate your help. How do I get a Realtek RTL8723BE wireless card to work? I am trying to solve the following two problems:  1) Prove that the functions $\cos(z)$, $\sin(z)$ are surjective over the complex numbers.  2) Find all $z \in \mathbb C$: $cos(z) \in \mathbb R$ and find all $z \in \mathbb C$: $\sin(z) \in \mathbb R$.  For 1),I've tried to prove it for the function $\cos(z)$ (I suppose the other one is analogue)  so I've used the fact that $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$.  Let $w \in \mathbb C$, I want to show there exists $z \in \mathbb C : f(z)=w$, i.e., $\dfrac{e^{iz}+e^{-iz}}{2}=w$, multiplying by $2$ and then by $e^{iz}$ yields $e^{2iz}+1=2we^{iz}$ iff $e^{2iz}-2we^{iz}+1=0$.   I don't know if this approach is the correct one but here I've replaced $e^{iz}$ by $x$, so the solutions of the equation would be the roots of the polynomial $p(x)=x^2-2wx+1$, by the quadratic formula, I get that $x \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$, where $w_0^2=4w^2-4$.  Then, $e^{iz} \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$. At this point I got lost, I would like to explicitly show that $z$ exists and I can't see existence directly from the fact that $e^{iz}=\dfrac{2w+w_0}{2}$ or $e^{iz}=\dfrac{2w-w_0}{2}$.  First I thought of taking logarithm of both sides of the equation ir order to solve for $z$, but this is not a legitimate operation unless $e^{iz} \in \mathbb R$.   I couldn't go any farther.  For point 2) I have no idea what to do, should I use the identity $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$?  I would appreciate some help with the two points (specially with point 2), at least in 1) I could do something).   Btw, Happy new year! Sometimes, I want to have enumerate lists in LaTeX start at other than the first value (1, a, i, etc.) How can I make an enumerate list start at an arbitrary value?