Misplaced Pages

Z-order

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Z-order is an ordering of overlapping two-dimensional objects, such as windows in a stacking window manager , shapes in a vector graphics editor , or objects in a 3D application. One of the features of a typical GUI is that windows may overlap, so that one window hides part or all of another. When two windows overlap, their Z-order determines which one appears on top of the other.

#446553

62-462: The term "Z-order" refers to the order of objects along the Z-axis. In coordinate geometry , X typically refers to the horizontal axis (left to right), Y to the vertical axis (up and down), and Z refers to the axis perpendicular to the other two (forward or backward). One can think of the windows in a GUI as a series of planes parallel to the surface of the monitor. The windows are therefore stacked along

124-503: A {\displaystyle a} , reflects the function in the y {\displaystyle y} -axis when it is negative. The k {\displaystyle k} and h {\displaystyle h} values introduce translations, h {\displaystyle h} , vertical, and k {\displaystyle k} horizontal. Positive h {\displaystyle h} and k {\displaystyle k} values mean

186-436: A , b , c ) {\displaystyle \mathbf {n} =(a,b,c)} be a nonzero vector. The plane determined by this point and vector consists of those points P {\displaystyle P} , with position vector r {\displaystyle \mathbf {r} } , such that the vector drawn from P 0 {\displaystyle P_{0}} to P {\displaystyle P}

248-410: A x + b y + c z + d = 0 ,  where  d = − ( a x 0 + b y 0 + c z 0 ) . {\displaystyle ax+by+cz+d=0,{\text{ where }}d=-(ax_{0}+by_{0}+cz_{0}).} Conversely, it is easily shown that if a , b , c and d are constants and a , b , and c are not all zero, then

310-415: A dot product , not scalar multiplication.) Expanded this becomes a ( x − x 0 ) + b ( y − y 0 ) + c ( z − z 0 ) = 0 , {\displaystyle a(x-x_{0})+b(y-y_{0})+c(z-z_{0})=0,} which is the point-normal form of the equation of a plane. This is just a linear equation :

372-511: A computer screen, an object with a Z-order of 1 would be visually "underneath" an object with a Z-order of 2 or greater. This is the same as making "layers" of objects where the Z-order determines what object is on top of another. An HTML page can use CSS to specify the Z-order so that some objects can be layered over others. Z-ordering is also used in 3D applications to determine object visibility based on overlap from other objects. This confers

434-497: A foundation for calculus in Europe. Initially the work was not well received, due, in part, to the many gaps in arguments and complicated equations. Only after the translation into Latin and the addition of commentary by van Schooten in 1649 (and further work thereafter) did Descartes's masterpiece receive due recognition. Pierre de Fermat also pioneered the development of analytic geometry. Although not published in his lifetime,

496-628: A manner analogous to the way lines in a two-dimensional space are described using a point-slope form for their equations, planes in a three dimensional space have a natural description using a point in the plane and a vector orthogonal to it (the normal vector ) to indicate its "inclination". Specifically, let r 0 {\displaystyle \mathbf {r} _{0}} be the position vector of some point P 0 = ( x 0 , y 0 , z 0 ) {\displaystyle P_{0}=(x_{0},y_{0},z_{0})} , and let n = (

558-455: A manner that may be called an analytic geometry of one dimension; with the question of finding points on a line that were in a ratio to the others. Apollonius in the Conics further developed a method that is so similar to analytic geometry that his work is sometimes thought to have anticipated the work of Descartes by some 1800 years. His application of reference lines, a diameter and a tangent

620-562: A manuscript form of Ad locos planos et solidos isagoge (Introduction to Plane and Solid Loci) was circulating in Paris in 1637, just prior to the publication of Descartes' Discourse . Clearly written and well received, the Introduction also laid the groundwork for analytical geometry. The key difference between Fermat's and Descartes' treatments is a matter of viewpoint: Fermat always started with an algebraic equation and then described

682-408: A multiple of one equation to the other equation so that one of the variables is eliminated. For our current example, if we subtract the first equation from the second we get ( x − 1 ) 2 − x 2 = 0 {\displaystyle (x-1)^{2}-x^{2}=0} . The y 2 {\displaystyle y^{2}} in the first equation

SECTION 10

#1732798188447

744-464: A single linear equation, so they are frequently described by parametric equations : x = x 0 + a t {\displaystyle x=x_{0}+at} y = y 0 + b t {\displaystyle y=y_{0}+bt} z = z 0 + c t {\displaystyle z=z_{0}+ct} where: In the Cartesian coordinate system ,

806-505: A speed advantage to the user as the computer does not need to render unseen objects. In practice, of course, some objects may be only partially obscured, and this is a complication that must be taken into account. In early real-time 3D graphics, Z-order was applied on a per-polygon basis to avoid using Z-buffer, which was considered expensive at the time. In modern 3D graphics, Z-order is used for order-dependent rendering, for example with semi-transparent objects. It can also be used to reduce

868-404: A systematic study of space curves and surfaces. In analytic geometry, the plane is given a coordinate system, by which every point has a pair of real number coordinates. Similarly, Euclidean space is given coordinates where every point has three coordinates. The value of the coordinates depends on the choice of the initial point of origin. There are a variety of coordinate systems used, but

930-600: Is a 2 -dimensional surface in 3-dimensional space defined as the locus of zeros of a quadratic polynomial . In coordinates x 1 , x 2 , x 3 , the general quadric is defined by the algebraic equation ∑ i , j = 1 3 x i Q i j x j + ∑ i = 1 3 P i x i + R = 0. {\displaystyle \sum _{i,j=1}^{3}x_{i}Q_{ij}x_{j}+\sum _{i=1}^{3}P_{i}x_{i}+R=0.} Quadric surfaces include ellipsoids (including

992-477: Is a relation in the x y {\displaystyle xy} plane. For example, x 2 + y 2 − 1 = 0 {\displaystyle x^{2}+y^{2}-1=0} is the relation that describes the unit circle. For two geometric objects P and Q represented by the relations P ( x , y ) {\displaystyle P(x,y)} and Q ( x , y ) {\displaystyle Q(x,y)}

1054-456: Is always in front of another element with lower stack order. Negative stack orders can also be used in the same manner. A negative value will appear behind a positive one. z-index only works on elements that have a position value (e.g. position: relative; ) and for many coders, this one of the first things to investigate when debugging why the z-index isn't working. Like all other CSS properties, it can be set with JavaScript as well with

1116-484: Is defined by the formula d = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 , {\displaystyle d={\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}},} which can be viewed as a version of the Pythagorean theorem . Similarly, the angle that a line makes with the horizontal can be defined by

1178-605: Is essentially no different from our modern use of a coordinate frame, where the distances measured along the diameter from the point of tangency are the abscissas, and the segments parallel to the tangent and intercepted between the axis and the curve are the ordinates. He further developed relations between the abscissas and the corresponding ordinates that are equivalent to rhetorical equations (expressed in words) of curves. However, although Apollonius came close to developing analytic geometry, he did not manage to do so since he did not take into account negative magnitudes and in every case

1240-694: Is false. ( 0 , 0 ) {\displaystyle (0,0)} is not in P {\displaystyle P} so it is not in the intersection. The intersection of P {\displaystyle P} and Q {\displaystyle Q} can be found by solving the simultaneous equations: x 2 + y 2 = 1 {\displaystyle x^{2}+y^{2}=1} ( x − 1 ) 2 + y 2 = 1. {\displaystyle (x-1)^{2}+y^{2}=1.} Traditional methods for finding intersections include substitution and elimination. Substitution: Solve

1302-420: Is part of the body of Persian mathematics that was eventually transmitted to Europe. Because of his thoroughgoing geometrical approach to algebraic equations, Khayyam can be considered a precursor to Descartes in the invention of analytic geometry. Analytic geometry was independently invented by René Descartes and Pierre de Fermat , although Descartes is sometimes given sole credit. Cartesian geometry ,

SECTION 20

#1732798188447

1364-513: Is perpendicular to n {\displaystyle \mathbf {n} } . Recalling that two vectors are perpendicular if and only if their dot product is zero, it follows that the desired plane can be described as the set of all points r {\displaystyle \mathbf {r} } such that n ⋅ ( r − r 0 ) = 0. {\displaystyle \mathbf {n} \cdot (\mathbf {r} -\mathbf {r} _{0})=0.} (The dot here means

1426-918: Is represented by an ordered triple of coordinates ( x ,  y ,  z ). In polar coordinates , every point of the plane is represented by its distance r from the origin and its angle θ , with θ normally measured counterclockwise from the positive x -axis. Using this notation, points are typically written as an ordered pair ( r , θ ). One may transform back and forth between two-dimensional Cartesian and polar coordinates by using these formulae: x = r cos ⁡ θ , y = r sin ⁡ θ ; r = x 2 + y 2 , θ = arctan ⁡ ( y / x ) . {\displaystyle x=r\,\cos \theta ,\,y=r\,\sin \theta ;\,r={\sqrt {x^{2}+y^{2}}},\,\theta =\arctan(y/x).} This system may be generalized to three-dimensional space through

1488-793: Is subtracted from the y 2 {\displaystyle y^{2}} in the second equation leaving no y {\displaystyle y} term. The variable y {\displaystyle y} has been eliminated. We then solve the remaining equation for x {\displaystyle x} , in the same way as in the substitution method: x 2 − 2 x + 1 − x 2 = 0 {\displaystyle x^{2}-2x+1-x^{2}=0} − 2 x = − 1 {\displaystyle -2x=-1} x = 1 / 2. {\displaystyle x=1/2.} We then place this value of x {\displaystyle x} in either of

1550-420: Is the angle between A and B . Transformations are applied to a parent function to turn it into a new function with similar characteristics. The graph of R ( x , y ) {\displaystyle R(x,y)} is changed by standard transformations as follows: There are other standard transformation not typically studied in elementary analytic geometry because the transformations change

1612-400: Is the equation for any circle centered at the origin (0, 0) with a radius of r. Lines in a Cartesian plane , or more generally, in affine coordinates , can be described algebraically by linear equations. In two dimensions, the equation for non-vertical lines is often given in the slope-intercept form : y = m x + b {\displaystyle y=mx+b} where: In

1674-424: The field of real numbers satisfy the axioms of Euclidean geometry , and, from the axioms of Euclidean geometry, one can construct a field that is isomorphic to the real numbers. Analytic geometry was developed from the Cartesian coordinate system introduced by René Descartes . It implicitly assumed this axiom by blending the distinct concepts of real numbers and points on a line, sometimes referred to as

1736-528: The graph of a quadratic equation in two variables is always a conic section – though it may be degenerate, and all conic sections arise in this way. The equation will be of the form A x 2 + B x y + C y 2 + D x + E y + F = 0  with  A , B , C  not all zero. {\displaystyle Ax^{2}+Bxy+Cy^{2}+Dx+Ey+F=0{\text{ with }}A,B,C{\text{ not all zero.}}} As scaling all six constants yields

1798-572: The real number line . Artin's proof, not only makes this blend explicitly, but also that analytic geometry is strictly equivalent with the traditional synthetic geometry , in the sense that exactly the same theorems can be proved in the two frameworks. Another consequence is that Alfred Tarski's proof of the decidability of first-order theories of the real numbers could be seen as an algorithm to solve any first-order problem in Euclidean geometry . This mathematical logic -related article

1860-429: The sphere ), paraboloids , hyperboloids , cylinders , cones , and planes . In analytic geometry, geometric notions such as distance and angle measure are defined using formulas . These definitions are designed to be consistent with the underlying Euclidean geometry . For example, using Cartesian coordinates on the plane, the distance between two points ( x 1 ,  y 1 ) and ( x 2 ,  y 2 )

1922-408: The xy -plane makes with respect to the horizontal axis, and the angle φ that it makes with respect to the z -axis. The names of the angles are often reversed in physics. In analytic geometry, any equation involving the coordinates specifies a subset of the plane, namely the solution set for the equation, or locus . For example, the equation y  =  x corresponds to the set of all

Z-order - Misplaced Pages Continue

1984-416: The 1st and 3rd or 2nd and 4th quadrant. In general, if y = f ( x ) {\displaystyle y=f(x)} , then it can be transformed into y = a f ( b ( x − k ) ) + h {\displaystyle y=af(b(x-k))+h} . In the new transformed function, a {\displaystyle a} is the factor that vertically stretches

2046-607: The Cartesian coordinate system is applied to manipulate equations for planes, straight lines, and circles, often in two and sometimes three dimensions. Geometrically, one studies the Euclidean plane (two dimensions) and Euclidean space. As taught in school books, analytic geometry can be explained more simply: it is concerned with defining and representing geometric shapes in a numerical way and extracting numerical information from shapes' numerical definitions and representations. That

2108-430: The Z-axis, and the Z-order information thus specifies the front-to-back ordering of the windows on the screen. An analogy would be some sheets of paper scattered on top of a table, each sheet being a window, the table your computer screen, and the top sheet having the highest Z value. Typically, users of a GUI can affect the Z-order by selecting a window to be brought to the foreground (that is, "above" or "in front of" all

2170-582: The algebra of the real numbers can be employed to yield results about the linear continuum of geometry relies on the Cantor–Dedekind axiom . The Greek mathematician Menaechmus solved problems and proved theorems by using a method that had a strong resemblance to the use of coordinates and it has sometimes been maintained that he had introduced analytic geometry. Apollonius of Perga , in On Determinate Section , dealt with problems in

2232-621: The alternative term used for analytic geometry, is named after Descartes. Descartes made significant progress with the methods in an essay titled La Géométrie (Geometry) , one of the three accompanying essays (appendices) published in 1637 together with his Discourse on the Method for Rightly Directing One's Reason and Searching for Truth in the Sciences , commonly referred to as Discourse on Method . La Geometrie , written in his native French tongue, and its philosophical principles, provided

2294-491: The angle between two vectors is given by the dot product . The dot product of two Euclidean vectors A and B is defined by A ⋅ B = d e f ‖ A ‖ ‖ B ‖ cos ⁡ θ , {\displaystyle \mathbf {A} \cdot \mathbf {B} {\stackrel {\mathrm {def} }{=}}\left\|\mathbf {A} \right\|\left\|\mathbf {B} \right\|\cos \theta ,} where θ

2356-638: The circle with radius 1 and center ( 1 , 0 ) : Q = { ( x , y ) | ( x − 1 ) 2 + y 2 = 1 } {\displaystyle (1,0):Q=\{(x,y)|(x-1)^{2}+y^{2}=1\}} . The intersection of these two circles is the collection of points which make both equations true. Does the point ( 0 , 0 ) {\displaystyle (0,0)} make both equations true? Using ( 0 , 0 ) {\displaystyle (0,0)} for ( x , y ) {\displaystyle (x,y)} ,

2418-407: The coordinate system was superimposed upon a given curve a posteriori instead of a priori . That is, equations were determined by curves, but curves were not determined by equations. Coordinates, variables, and equations were subsidiary notions applied to a specific geometric situation. The 11th-century Persian mathematician Omar Khayyam saw a strong relationship between geometry and algebra and

2480-404: The equation for Q {\displaystyle Q} becomes ( 0 − 1 ) 2 + 0 2 = 1 {\displaystyle (0-1)^{2}+0^{2}=1} or ( − 1 ) 2 = 1 {\displaystyle (-1)^{2}=1} which is true, so ( 0 , 0 ) {\displaystyle (0,0)} is in

2542-564: The first equation for y {\displaystyle y} in terms of x {\displaystyle x} and then substitute the expression for y {\displaystyle y} into the second equation: x 2 + y 2 = 1 {\displaystyle x^{2}+y^{2}=1} y 2 = 1 − x 2 . {\displaystyle y^{2}=1-x^{2}.} We then substitute this value for y 2 {\displaystyle y^{2}} into

Z-order - Misplaced Pages Continue

2604-529: The following syntax: Coordinate geometry In mathematics , analytic geometry , also known as coordinate geometry or Cartesian geometry , is the study of geometry using a coordinate system . This contrasts with synthetic geometry . Analytic geometry is used in physics and engineering , and also in aviation , rocketry , space science , and spaceflight . It is the foundation of most modern fields of geometry, including algebraic , differential , discrete and computational geometry . Usually

2666-679: The formula θ = arctan ⁡ ( m ) , {\displaystyle \theta =\arctan(m),} where m is the slope of the line. In three dimensions, distance is given by the generalization of the Pythagorean theorem: d = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 + ( z 2 − z 1 ) 2 , {\displaystyle d={\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}+(z_{2}-z_{1})^{2}}},} while

2728-441: The function if it is greater than 1 or vertically compresses the function if it is less than 1, and for negative a {\displaystyle a} values, the function is reflected in the x {\displaystyle x} -axis. The b {\displaystyle b} value compresses the graph of the function horizontally if greater than 1 and stretches the function horizontally if less than 1, and like

2790-391: The function is translated to the positive end of its axis and negative meaning translation towards the negative end. Transformations can be applied to any geometric equation whether or not the equation represents a function. Transformations can be considered as individual transactions or in combinations. Suppose that R ( x , y ) {\displaystyle R(x,y)}

2852-402: The geometric curve that satisfied it, whereas Descartes started with geometric curves and produced their equations as one of several properties of the curves. As a consequence of this approach, Descartes had to deal with more complicated equations and he had to develop the methods to work with polynomial equations of higher degree. It was Leonhard Euler who first applied the coordinate method in

2914-445: The graph of the equation a x + b y + c z + d = 0 , {\displaystyle ax+by+cz+d=0,} is a plane having the vector n = ( a , b , c ) {\displaystyle \mathbf {n} =(a,b,c)} as a normal. This familiar equation for a plane is called the general form of the equation of the plane. In three dimensions, lines can not be described by

2976-555: The intersection is the collection of all points ( x , y ) {\displaystyle (x,y)} which are in both relations. For example, P {\displaystyle P} might be the circle with radius 1 and center ( 0 , 0 ) {\displaystyle (0,0)} : P = { ( x , y ) | x 2 + y 2 = 1 } {\displaystyle P=\{(x,y)|x^{2}+y^{2}=1\}} and Q {\displaystyle Q} might be

3038-469: The intersection. Cantor%E2%80%93Dedekind axiom In mathematical logic , the Cantor–Dedekind axiom is the thesis that the real numbers are order- isomorphic to the linear continuum of geometry . In other words, the axiom states that there is a one-to-one correspondence between real numbers and points on a line. This axiom became a theorem proved by Emil Artin in his book Geometric Algebra . More precisely, Euclidean spaces defined over

3100-417: The most common are the following: The most common coordinate system to use is the Cartesian coordinate system , where each point has an x -coordinate representing its horizontal position, and a y -coordinate representing its vertical position. These are typically written as an ordered pair ( x ,  y ). This system can also be used for three-dimensional geometry, where every point in Euclidean space

3162-839: The original equations and solve for y {\displaystyle y} : ( 1 / 2 ) 2 + y 2 = 1 {\displaystyle (1/2)^{2}+y^{2}=1} y 2 = 3 / 4 {\displaystyle y^{2}=3/4} y = ± 3 2 . {\displaystyle y={\frac {\pm {\sqrt {3}}}{2}}.} So our intersection has two points: ( 1 / 2 , + 3 2 ) and ( 1 / 2 , − 3 2 ) . {\displaystyle \left(1/2,{\frac {+{\sqrt {3}}}{2}}\right)\;\;{\text{and}}\;\;\left(1/2,{\frac {-{\sqrt {3}}}{2}}\right).} Elimination : Add (or subtract)

SECTION 50

#1732798188447

3224-854: The original equations and solve for y {\displaystyle y} : ( 1 / 2 ) 2 + y 2 = 1 {\displaystyle (1/2)^{2}+y^{2}=1} y 2 = 3 / 4 {\displaystyle y^{2}=3/4} y = ± 3 2 . {\displaystyle y={\frac {\pm {\sqrt {3}}}{2}}.} So our intersection has two points: ( 1 / 2 , + 3 2 ) and ( 1 / 2 , − 3 2 ) . {\displaystyle \left(1/2,{\frac {+{\sqrt {3}}}{2}}\right)\;\;{\text{and}}\;\;\left(1/2,{\frac {-{\sqrt {3}}}{2}}\right).} For conic sections, as many as 4 points might be in

3286-674: The other equation and proceed to solve for x {\displaystyle x} : ( x − 1 ) 2 + ( 1 − x 2 ) = 1 {\displaystyle (x-1)^{2}+(1-x^{2})=1} x 2 − 2 x + 1 + 1 − x 2 = 1 {\displaystyle x^{2}-2x+1+1-x^{2}=1} − 2 x = − 1 {\displaystyle -2x=-1} x = 1 / 2. {\displaystyle x=1/2.} Next, we place this value of x {\displaystyle x} in either of

3348-422: The other windows). Some window managers allow interaction with windows while they are not in the foreground, while others will bring a window to the front whenever it receives input from the user. It is also possible for special windows to be designated "always on top"; these are then fixed to the top of the Z-order so that (with few exceptions) no other window can overlap them. When dealing with visual objects on

3410-448: The plane. This is not always the case: the trivial equation x  =  x specifies the entire plane, and the equation x  +  y  = 0 specifies only the single point (0, 0). In three dimensions, a single equation usually gives a surface , and a curve must be specified as the intersection of two surfaces (see below), or as a system of parametric equations . The equation x  +  y  =  r

3472-408: The points on the plane whose x -coordinate and y -coordinate are equal. These points form a line , and y  =  x is said to be the equation for this line. In general, linear equations involving x and y specify lines, quadratic equations specify conic sections , and more complicated equations describe more complicated figures. Usually, a single equation corresponds to a curve on

3534-480: The problem of Z-fighting , by either rendering farther objects first and then using weak inequality as the depth test or, conversely, rendering front-to-back and using strict inequality. The actual number assigned to a particular place in the Z-order is sometimes known as the z-index. In particular the CSS property that sets the stack order of specific elements is known as the z-index. An element with greater stack order

3596-477: The relation Q {\displaystyle Q} . On the other hand, still using ( 0 , 0 ) {\displaystyle (0,0)} for ( x , y ) {\displaystyle (x,y)} the equation for P {\displaystyle P} becomes 0 2 + 0 2 = 1 {\displaystyle 0^{2}+0^{2}=1} or 0 = 1 {\displaystyle 0=1} which

3658-455: The same locus of zeros, one can consider conics as points in the five-dimensional projective space P 5 . {\displaystyle \mathbf {P} ^{5}.} The conic sections described by this equation can be classified using the discriminant B 2 − 4 A C . {\displaystyle B^{2}-4AC.} If the conic is non-degenerate, then: A quadric , or quadric surface ,

3720-549: The shape of objects in ways not usually considered. Skewing is an example of a transformation not usually considered. For more information, consult the Misplaced Pages article on affine transformations . For example, the parent function y = 1 / x {\displaystyle y=1/x} has a horizontal and a vertical asymptote, and occupies the first and third quadrant, and all of its transformed forms have one horizontal and vertical asymptote, and occupies either

3782-405: The use of cylindrical or spherical coordinates. In cylindrical coordinates , every point of space is represented by its height z , its radius r from the z -axis and the angle θ its projection on the xy -plane makes with respect to the horizontal axis. In spherical coordinates, every point in space is represented by its distance ρ from the origin, the angle θ its projection on

SECTION 60

#1732798188447

3844-427: Was moving in the right direction when he helped close the gap between numerical and geometric algebra with his geometric solution of the general cubic equations , but the decisive step came later with Descartes. Omar Khayyam is credited with identifying the foundations of algebraic geometry , and his book Treatise on Demonstrations of Problems of Algebra (1070), which laid down the principles of analytic geometry,

#446553