Skip to content

Commit

Permalink
Add: common abbreviations
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Sep 22, 2024
1 parent 7420487 commit db60101
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
1 change: 1 addition & 0 deletions trees/ag-000N.tree
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
\transclude{ag-000O}
\transclude{ag-0018}
\transclude{ag-0019}
\transclude{ag-001G}
}
8 changes: 4 additions & 4 deletions trees/ag-0019.tree
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

\card{example}{ray marching (naïve)}{

\p{The following renders a scene with a unit sphere at the origin, the camera at #{(0,0,-8)} and looking at the origin, through a screen of height 1.0, centered at 5.0 from the camera.
\p{The following renders a scene with a unit sphere at the origin, the camera at #{(0,0,8)} and looking at the origin, through a screen of height 1.0, centered at 5.0 from the camera.
}

\p{The color of pixels are adjusted so that they are brighter the closer they are to the camera, as if there is a light source at the camera. As it takes a fixed step size of 0.1 (not small enough), the sphere is not rendered smoothly, and clearly shows the stepping artifacts.
Expand Down Expand Up @@ -65,9 +65,9 @@ void mainImage(out vec4 pixelColor, in vec2 pixelCoordinate) {

// set up camera and view ray
float observerDistance = 8.0;
vec3 ro = vec3(0.0, 0.0, -observerDistance);
vec3 cameraBox = ro + vec3(uv, 5.0);
vec3 rd = normalize(cameraBox - ro);
vec3 ro = vec3(0.0, 0.0, observerDistance);
vec3 ta = ro - vec3(uv, 5.0);
vec3 rd = normalize(ta - ro);

// ray march
float t = rayMarch(ro, rd);
Expand Down
28 changes: 28 additions & 0 deletions trees/ag-001G.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
\import{cg-macros}
% clifford hopf spin tt ag math draft cg
\tag{cg}

% definition theorem lemma construction observation
% convention corollary axiom example exercise proof
% discussion remark notation
% \taxon{}
% \refcardt{lemma}{}{}{}{

% kostecki2011introduction leinster2016basic nakahira2023diagrammatic rosiak2022sheaf

% cox1997ideals gathmann2013commutative hart1996sphere gillespie2024ray winchenbach2024lipschitz

\card{remark}{ }{
\p{By convention, the GLSL community uses two-to-three letter variable names. Here are some common abbreviations:}

\ul{
\li{\code{ro} = ray origin}
\li{\code{rd} = ray direction}
\li{\code{ca} = camera}
\li{\code{ta} = target (where the camera is pointing)}
\li{\code{uv} = texture coordinates}
}

\p{Source: \link{https://raymarchingfundamentals.org/a-quick-background#the-raymarching-part}
}
}

0 comments on commit db60101

Please sign in to comment.