I'm currently trying to do Andrew Price's "Create a Realistic Earth Tutorial ()", but in Cycles, and I am unable to change the texture based on how much light that part of the object is receiving. If you look at the second link, you'll see the effect Im trying to create - where the dark side displays city light. I should also add that I want to do this specifically with edited image textures.  My currently node setup is linked, everything works perfectly independently, but the nodes inside the red box are what seems to mess everything up. Thanks a lot for any help you can provide.  --  Here is my current node setup:   Here is the effect I am trying to achieve:
I was watching the  tutorial by Andrew Price and I was able to follow along in Cycles until I hit the part where he mixes the day and night materials together so that the lights show up on the "dark side" of the earth.  How can I recreate this effect in cycles? I thought I could use the ray information to tell me if there was incoming light but I've found no such node to give me this information.
Different ways to prove there are infinitely many primes? This is just a curiosity. I have come across multiple proofs of the fact that there are infinitely many primes, some of them were quite trivial, but some others were really, really fancy. I'll show you what proofs I have and I'd like to know more because I think it's cool to see that something can be proved in so many different ways.  Proof 1 : Euclid's. If there are finitely many primes then $p_1 p_2 ... p_n + 1$ is coprime to all of these guys. This is the basic idea in most proofs : generate a number coprime to all previous primes.  Proof 2 : Consider the sequence $a_n = 2^{2^n} + 1$. We have that  $$ 2^{2^n}-1 = (2^{2^1} - 1) \prod_{m=1}^{n-1} (2^{2^m}+1), $$  so that for $m &lt; n$, $(2^{2^m} + 1, 2^{2^n} + 1) \, | \, (2^{2^n}-1, 2^{2^n} +1) = 1$. Since we have an infinite sequence of numbers coprime in pairs, at least one prime number must divide each one of them and they are all distinct primes, thus giving an infinity of them.  Proof 3 : (Note : I particularly like this one.) Define a topology on $\mathbb Z$ in the following way : a set $\mathscr N$ of integers is said to be open if for every $n \in \mathscr N$ there is an arithmetic progression $\mathscr A$ such that $n \in \mathscr A \subseteq \mathscr N$. This can easily be proven to define a topology on $\mathbb Z$. Note that under this topology arithmetic progressions are open and closed. Supposing there are finitely many primes, notice that this means that the set $$ \mathscr U \,\,\,\, \overset{def}{=} \,\,\, \bigcup_{p} \,\, p \mathbb Z $$ should be open and closed, but by the fundamental theorem of arithmetic, its complement in $\mathbb Z$ is the set $\{ -1, 1 \}$, which is not open, thus giving a contradiction.   Proof 4 : Let $a,b$ be coprime integers and $c &gt; 0$. There exists $x$ such that $(a+bx, c) = 1$. To see this, choose $x$ such that $a+bx \not\equiv 0 \, \mathrm{mod}$ $p_i$ for all primes $p_i$ dividing $c$. If $a \equiv 0 \, \mathrm{mod}$ $p_i$, since $a$ and $b$ are coprime, $b$ has an inverse mod $p_i$, call it $\overline{b}$. Choosing $x \equiv \overline{b} \, \mathrm{mod}$ $p_i$, you are done. If $a \not\equiv 0 \, \mathrm{mod}$ $p_i$, then choosing $x \equiv 0 \, \mathrm{mod}$ $p_i$ works fine. Find $x$ using the Chinese Remainder Theorem.   Now assuming there are finitely many primes, let $c$ be the product of all of them. Our construction generates an integer coprime to $c$, giving a contradiction to the fundamental theorem of arithmetic.  Proof 5 : Dirichlet's theorem on arithmetic progressions (just so that you not bring it up as an example...)  Do you have any other nice proofs? How to get reflections from 3D to show up on real images Andrew Price released a nice tutorial on how to nicely put 3D objects on top of a real image:   I have seen images, such as this:  which have 3D elements over images and have actual reflections from the object showing up on the wet asphalt.  How can this effect be achieved using render passes (or any other way)?  Here is another example (from ): Given an integer $n$, we are asked to investigate about the existence of integer divisors of $n^2+1$ of the form $4k+3$. Can you provide some insights about it? using apt-cache search I am learning how to use apt. When I do an apt-cache search git to see all packages matching git, I see a bunch of packages whose descriptions have nothing to do with git. Why is this so and how can I fix it? (Ubuntu 12.04.2 LTS).  Also, why is the search functionality found in a command that has "cache" in its name? What does search functionality have to do with caches?  Thanks. Forgot to submit consumption tax (GST) declaration form upon exiting Tokyo Manipulating Partial Derivatives of Inverse Function In lectures we're told:  $$\dfrac {\partial y} {\partial x} = \dfrac 1 {\dfrac {\partial x} {\partial y}}$$  as long as the same variables are being held constant in each partial derivative.  The course is 'applied maths', i.e non-rigorous, so don't confuse me.  But anyway, if we have:  $$\xi = x - y \qquad \eta = x$$  Then $\dfrac {\partial x} {\partial \xi} = 0$ and $\dfrac {\partial \xi} {\partial x} = 1$.  The rule presumably fails because one of the partial derivatives is $0$.  But then isn't this rule useless? Since I cannot use it without checking that the partial derivative isn't in fact $0$, but then I've worked out the partial derivative manually anyway. 'pyrcc5' is not recognized as an internal or external command I have seen some comments and speculations about the robot having an off switch or whatever. But I want to know if there is any source material or comment from the author on how they managed to pass the exam.  I have only seen the actual author's comment on Mineta:     But I was wondering if there are author notes for the other characters. Usage of 'shall' in questions Let's say I want to arrange a lesson with my coach and I say:  Shall we have a lesson on Monday?  I understand the use of 'shall' in American English is considered to be formal, whereas this is not the case in British English. I would like to understand the different connotations (is it formal? is it a request for confirmation? is it a suggestion?) that the following questions have:  A. Shall we have a lesson on Monday? B. Can we have a lesson on Monday? C. Should we have a lesson on Monday? D. Could we have a lesson on Monday? E. Are we having a lesson on Monday? F. Will we have a lesson on Monday? G. Are we going to have a lesson on Monday? Finding sharing settings OWD Do Inverters change the lithium-ion batterie's mA capacity and wattage? let me say if I have a pack of lithium batteries connected in series and parallels, and i want to connect it to an Inverter, BUT...BEFORE I connect it to inverter, lets say it gives out 12 volts "hypothetically" some informations like 3.7 volt batteries, and 2500 mAh,  lets say then the pack gives 12 volts in DC and hypothetically again I calculate it ((still in DC)) is .....  W = V* Amp ... then it means wattage = 11.1 V * 5 Ah which is 55.5 W. then we got 55.5 watts, THEN....after we want to change the dc into ac it gives you 120 volts "please hypothetically" just answer me this, ARE the Wattage And Ampere are remains the same as DC? what would it be the result after AC? Is it true that an ideal is primary iff its radical is prime? Running two independent instances of Chrome I use Chrome as my main browser.  I also spend a lot of time on a particular webapp that my company uses.  I'd like to keep those two things separate.  I can run the webapp in a separate window - but I'd like to go further than that.  I'd like to have it be identified by a different task in the Win 7 taskbar; ideally a different icon; and ideally a different title in Process Monitor.  How can I run a second, independent instance of Chrome, with a different title and icon, that won't merge with my main Chrome browser. Say I have a metric space $(X, d)$ and a set $A\in X$.  I want to prove that if $a \in \overline{A}$ then there is a convergent sequence $\{x_n\}$ that converges to $a$. Could I have any help? Can we model gravitation as a repulsive force? This question is actually related to my earlier question ("").  The fact that objects move a lot in the universe and that the universe is expanding, can imply that gravity is a repulsive force that increases with distance.. so the farthest objects repel us more.  This can still explain several existing observations, e.g., why does the apple fall?   Motion is the result of such repulsion. Two objects unlucky enough not to be moving relative to each other get squished due to the repulsion of the rest of the universe  around them. The earth repels the apple less than the stars so it is pushed towards the earth.   Furthermore, it can explain the expanding universe without the need for dark energy.  This could be demonstrated in a thought experiment. If we take a lot of same-charge particles (with small mass) such as electrons and lock them in a large box at a low enough temperature. The mutual repulsion of the particles may cause similar motion as if due to gravitational attraction.   Another experiment would be to measure the slight changes in our weight during day and night when the sun and earth align (if their masses are large enough to detect the feeble change in repulsion).   [EDIT: the question in the original form may not have been clear. It is "can we model".. with a yes/no answer and why (not). If downvoting, please justify. Do I need a visa to transit (or layover) in the Schengen area? I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland I would like to install Ubuntu  for almost 120 users. But it's very difficult in using USB and drives.  Any suggestions? I bought a new MacBook Air and was able to connect to the internet at first but now it won't connect.  I have other devices as well as other computers on wifi but my Mac won't connect.  When I try and click on the wifi, it tells me that it can't be joined.  How can I troubleshoot? Often more than one person contributes to the community coming up with the final accepted answer to a question. However, it is only possible to accept a single answer. Restricting to one final answer does make sense for the sake of referencing that answer later, but in many cases that answer is the product of the input from several individuals. I would like to be able to decide how much of a bounty goes to different users, or some other mechanism to recognize the contribution of multiple users. Of course I could always upvote their previous answers, but this is really incorrect if their previous answers aren't the complete, final answer I've accepted.  What think you metaSOrs? Is it better in C++ to pass by value or pass by constant reference?