Determining IF & WHERE a line intersects with a 2D plane (in 3D space) The following problem I'm working on is for one of my favorite past-times: game development.  Problem: We're in 3D space. I'm trying to determine if a line between two vectors in said space is passing through a circle; the latter of which consists of: center vector, radius, yaw &amp; pitch. In order to determine that, my aim is to convert the circle to a plane which can either be infinite or just have the diameter of the circle for all it's sides. Should the line between the two vectors in fact pass through that plane, I am left with the simple task of determining whether that intersection point is within the radius of the circle, in which case I can return either true or false.  What's already working: I have my circles set up and the general framework is there. The circles are appearing/rendered in the 3D space exactly as specified, great!  What was already tried: Copied some github gist codes and tried to make them work for my purposes. I kinda worked, sometimes at least. Unfortunately due to the nature of how the code was written, I had no idea what it was doing and just scrapped all of that. Researched the topic a lot, too. But due to me not really understanding the language people speak when talking about line/plane intersections, I could have read the answer without recognizing it as such.  Question: I'm stuck at line intersections. No idea where to go and how it works logically! So, where do I go from here and how can one comprehend all of this?  Note: I'm working with Java, but I'm not looking for spoon-fed code. It's a logical issue I'm trying to get past. If explained well enough, I will make the code work with trial and error!
Calculate intersection of a line with a plane I was reading something about: “Intersection of a line with a plane”. But I don’t fully understand how to calculate it on their way.  The goal is to calculate where the plane and the line will “cross”. These items are given:   The eye is in position: O(0,0,-10)   A point of a 3D-object is P(10,20,30) The screen has the equation z=0   I have a questions about how they calculate this:    This part is clear. That is the location form the eye (vector representation).   They specify the location of the plane, there is nothing strange here (vector representation).   Now they calculate what part of the line will cross, how did they calculate this? How did they know a = 1/4? And b = 10/4?  This is everything that was given.
What's the difference between mobile and desktop processors? I just read about the new Samsung Galaxy Note Edge having a 2.7&nbsp;GHz quad-core processor and 3GB of RAM.  The laptop I bought last year by HP is 4&nbsp;GB of RAM and 2.3&nbsp;GHz quad-core and my iMac is even older and is 2.5&nbsp;GHz i5.  Does this mean that the new Samsung gadget is more powerful than my desktop?  Is the 2.7&nbsp;GHz the same kind of GHz as non-mobile devices (is it scaled up, or compared, etc.)?  Why, in terms of power, do modern computers not have two of those Samsung quad-core processors running in parallel pushing out 5.4&nbsp;GHz processing power for the amount of electrical energy as two Galaxy Note batteries? Looking for an intuitive explanation why the row rank is equal to the column rank for a matrix How do comments work? Across the Stack Exchange network you may leave comments on a question or answer.  How do comments work? What are comments for, and when shouldn't I comment? Who can post comments? Who can edit comments? How can I format and link in comments? My comment doesn't contain some of the text I typed in it; why? My comment appears to be long enough, but I can't post it because it's too short; why? Who can delete comments? When should comments be deleted? Why can't I comment on specific posts even if I have enough reputation to comment? When can comments be undeleted? What are automatic comments? How can I link to comments? Anything else I should know about comments?  Also see the FAQ articles on  and . Prove that $\frac4{abcd} \geq \frac a b + \frac bc + \frac cd +\frac d a$ Let $a, b, c$ and $d$ be positive real numbers such that $a+b+c+d = 4$. Prove that $$\frac4{abcd} \geq \frac a b + \frac bc + \frac cd +\frac d a .$$   How can I approach this using only the ? Are there any other methods that do not involve the AM-GM inequality? Are there any XSLT processing command line tools? Colors and legend in groupplots/barplot In order to compare three items I use the groupplot command. For each item I have n different criteria to compare.    Is it possible to set the color for each criteria itself? Meaning the first bar in every group goes gray, the second pink etc.. The legend than should contain the n compared criteria.  And... how do I manage to let the whole tikz-picture have a width of 0.9\textwith  \documentclass{standalone} \usepackage{pgfplots,pgfplotstable} \usetikzlibrary{pgfplots.groupplots}  \pgfplotstableread{ nr  fii faa foo a   10  15  12 b   12  18  14 c   13  19  15 d   9   13  10 e   7   11  8 f   10  15  12 }\datatable  \begin{document} \begin{tikzpicture} \begin{groupplot}     [group style={columns=3},         ybar,         ymin=0,         ymax=20,         xtick=\empty,         tickpos=both]  \nextgroupplot[xlabel=fii] \addplot [fill=blue] table [x expr=\coordindex, y=fii] {\datatable}; \nextgroupplot[xlabel=faa] \addplot [fill=green] table [x expr=\coordindex, y=faa] {\datatable}; \nextgroupplot[xlabel=foo] \addplot [fill=red] table [x expr=\coordindex, y=foo] {\datatable};  \end{groupplot} \end{tikzpicture} \end{document} Change folder permissions and ownership My table doesn't fit; what are my options? I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist? My Command is below and its print Free CPU and Used CPU below format.  I want to restrict awk output to 2 decimal place.  grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} {free=($5)*100/($2+$3+$4+$5)} END {print "Used Cpu:",usage "%"} {print "Free Cpu:",free "%"}'   Output :   Free Cpu: 98.9588%  Used Cpu: 1.04125%   Desired output :  Free Cpu: 98.95%  Used Cpu: 1.04% Let $G$ be a group, where $(ab)^3=a^3b^3$ and $(ab)^5=a^5b^5$. Prove that $G $ is an abelian group. Let G be a group, where $(ab)^3=(a^3)(b^3)$ and $(ab)^5=(a^5)(b^5)$. Prove that $G$ is abelian group.  Thank you in advance. Any help is appreciated. I would like to know if the same Minecraft account used on a computer can be used on a different platform like the Xbox 360? I am not asking about playing on each simultaneously as each platform has been purchased - I am asking if you can cross play on multiple platforms with the same account. Basically I would like to know if all the saved stuff and settings from one platform will carry over to another. Recovering data off of a dead hard drive My hard drive died in my macbook and it no longer will start up. It will not mount in an external enclosure but disk utility is still reading that the hard drive is there, and I tried to repair disk and I am getting this error: (Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.) So my question is how do I backup my files if the hard drive won't mount? The only way that I have been able to see the hard drive is through disk utility. I just want to be clear that I am using mac os x snow leapard. What's the difference between term_id and term_taxonomy_id I have seen many programs consisting of structures like the one below  typedef struct  {     int i;     char k; } elem;  elem user;   Why is it needed so often? Any specific reason or applicable area? Is there an easy way to log all commands executed, including command line arguments? I am trying to find how to log a specific instantiation of rrdtool to see whether the path it is receiving is incorrect.  I know I could wrap the executable in a shell script that would log the parameters, but I was wondering if there was a more kernel-specific way to monitor for that, perhaps a filesystem callback that sees when a particular /proc/pid/exe matches a given binary? Possible Duplicate:    I am using 10.04 LTS - Lucid Lynx. I shutdown the computer while a software update was running. Then after I restarted my computer and while the update manager was running, I got this error:  Could not download all repository indexes The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct. GPG error: http://toolbelt.herokuapp.com ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520 Failed to fetch  http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu/dists/**DISTRIBUTION**/main/binary-i386/Packages.gz 404  Not Found   I went through the answers to  and I tried this $ sudo launchpad-getkeys  Please wait... launchpad-getkeys is running an update so it can detect the missing GPG keys Trying to import all the missing keys gpg: requesting key 0F1B0520 from hkp server keyserver.ubuntu.com gpgkeys: key C927EBE00F1B0520 not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0 launchpad-getkeys has finished importing all missing GPG keys.  Try running sudo apt-get update - you shouldn't see any key  errors anymore  But when I run sudo apt-get update again, it again shows that the key was not found on the keyserver. How to solve this problem? are used by the Empire in a manner that is tactically identical to how a modern day army would use a tank, in that they are used as shock armour with powerful main guns which will punch through entrenched positions. (No combined arms tactics were used in the Battle of Hoth, but that's a different question altogether)  However, AT-AT walkers have a number of (rather lethal) drawbacks and no advantages that I can see compared to tanks.    They have footpads in place of treads, which greatly increase their ground pressure, and which will cause them to easily sink as compared to treads They have a high center of gravity and can be easily tripped, which was exploited in the Battle of Hoth. (granted that this was canonically presented as an oversight, albeit a rather stupid one, since most martial arts strongly emphasise lowering your CG.) They are slower than a modern main battle tank despite their long legs, which one would normally expect to grant additional mobility (max speed 60km/h on flat terrain, compared to 72km/h on flat terrain for the ). This is exacerbated by the fact that AT-AT walkers are using fusion power cells as compared to diesel engines.   It would seem that it would make far more sense for the Empire to remove the legs and mount the main chassis on treads, which would make the vehicle far more effective. Why then, did they not do this? It clearly was not the case that imperial Engineers lacked imagination, as they did produce .   Possible answers which I find implausible as advantages:  1: AT-AT walkers are tall, and therefore have a surveying advantage over the battlefield / have a better vantage point to fire from  Orbital satellites can provide the observation, and in any case air/orbital support should always be called in, especially if fire support from above is required. As a  developer I'm used to running through constructors:    class Test {     public Test() {         DoSomething();     }      public Test(int count) : this() {         DoSomethingWithCount(count);     }      public Test(int count, string name) : this(count) {         DoSomethingWithName(name);     } }   Is there a way to do this in C++?  I tried calling the Class name and using the 'this' keyword, but both fail. How can I concatenate two arrays in Java? linear dependence proof using subsets