Skip to content

Commit

Permalink
Merge pull request #161 from yt-project/sph-diagram-interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewturk committed Nov 21, 2023
1 parent 18f9284 commit e089d20
Show file tree
Hide file tree
Showing 67 changed files with 56,521 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Output directory containing the formatted manuscript

The [`gh-pages`](https://github.com/yt-project/yt-4.0-paper/tree/gh-pages) branch hosts the contents of this directory at <https://yt-project.github.io/yt-4.0-paper/>.
The permalink for this webpage version is <https://yt-project.github.io/yt-4.0-paper/v/f24c12087aff187ded08b836953ef110b4b7faed/>.
The permalink for this webpage version is <https://yt-project.github.io/yt-4.0-paper/v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/>.
To redirect to the permalink for the latest manuscript version at anytime, use the link <https://yt-project.github.io/yt-4.0-paper/v/freeze/>.

## Files
Expand Down Expand Up @@ -35,4 +35,4 @@ Verifying timestamps with the `ots verify` command requires running a local bitc
## Source

The manuscripts in this directory were built from
[`f24c12087aff187ded08b836953ef110b4b7faed`](https://github.com/yt-project/yt-4.0-paper/commit/f24c12087aff187ded08b836953ef110b4b7faed).
[`04a9eb7f09be21b07f86135f0e4c4d0df51749ed`](https://github.com/yt-project/yt-4.0-paper/commit/04a9eb7f09be21b07f86135f0e4c4d0df51749ed).
81 changes: 81 additions & 0 deletions images/sph_ray_tracing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
var particles = [
{ cx:65, cy:135, r:50},
{ cx:150, cy:175, r:35 },
{ cx:185, cy:130, r:7},
{ cx:160, cy:115, r:10},
{ cx:235, cy:90, r:40},
{ cx:215, cy:30, r:20},
{ cx:425, cy:45, r:40},
{ cx:280, cy:140, r:25 },
{ cx:350, cy:125, r:20 },
{ cx:410, cy:150, r:30},
{ cx:330, cy:180, r:35},
{ cx:255, cy:315, r:55},
{ cx:475, cy:240, r:60},
{ cx:650, cy:215, r:85},
{ cx:570, cy:45, r:45},
{ cx:705, cy:45, r:35},
];
const hitOptions = {
segments: true,
stroke: true,
fill: true,
tolerance: 5
};
function recalculateIntersections() {
for (const particle of particleGroup.children) {
if (rayLine.intersects(particle)) {
particle.fillColor.gradient.stops = ['red','white'];
particle.data.line.lastSegment.point = rayLine.getNearestPoint(particle.position);
particle.data.line.strokeColor = 'black';
} else {
particle.fillColor.gradient.stops = ['black', 'white'];
particle.data.line.strokeColor = null;
}
}
}

const particleGroup = new Group();

for (i = 0; i< particles.length; i++) {
const particle = particles[i];
var myCircle = new Path.Circle(new Point(particle.cx, particle.cy), particle.r);
myCircle.data.line = new Path.Line(myCircle.position, myCircle.position + new Point(0, particle.r))
myCircle.data.line.strokeWidth = 3;
myCircle.data.radius = particle.r;
myCircle.fillColor = {
gradient: {
stops: ['black', 'white'],
radial: true},

origin: myCircle.position,
destination: myCircle.bounds.rightCenter
};
particleGroup.addChild(myCircle);
}

const rayPoints = [new Point(50, 50), new Point(200, 50)];
const rayLine = new Path.Line(rayPoints[0], rayPoints[1]);
const rayStart = new Path.Circle(rayPoints[0], 8);
const rayStop = new Path.Circle(rayPoints[1], 8);
rayLine.strokeColor = 'darkgray';
rayLine.strokeWidth = 3;
rayStart.fillColor = 'red';
rayStop.fillColor = 'red';

function dragCircle(event) {
event.target.position += event.delta;
rayLine.firstSegment.point = rayStart.position;
rayLine.lastSegment.point = rayStop.position;
recalculateIntersections();
}

rayStart.onMouseDrag = rayStop.onMouseDrag = dragCircle;

function dragLine(event) {
event.target.position += event.delta;
rayStart.position = rayLine.firstSegment.point;
rayStop.position = rayLine.lastSegment.point;
recalculateIntersections();
}
rayLine.onMouseDrag = dragLine;
34 changes: 19 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<meta name="author" content="John H. Wise" />
<meta name="author" content="Shin-Rong Tsai" />
<meta name="author" content="Add Yourself" />
<meta name="dcterms.date" content="2023-11-20" />
<meta name="dcterms.date" content="2023-11-21" />
<meta name="keywords" content="markdown, publishing, manubot" />
<title>Introducing yt 4.0: Analysis and Visualization of Volumetric Data</title>
<style>
Expand Down Expand Up @@ -174,11 +174,11 @@
<meta name="citation_title" content="Introducing yt 4.0: Analysis and Visualization of Volumetric Data" />
<meta property="og:title" content="Introducing yt 4.0: Analysis and Visualization of Volumetric Data" />
<meta property="twitter:title" content="Introducing yt 4.0: Analysis and Visualization of Volumetric Data" />
<meta name="dc.date" content="2023-11-20" />
<meta name="citation_publication_date" content="2023-11-20" />
<meta property="article:published_time" content="2023-11-20" />
<meta name="dc.modified" content="2023-11-20T01:28:29+00:00" />
<meta property="article:modified_time" content="2023-11-20T01:28:29+00:00" />
<meta name="dc.date" content="2023-11-21" />
<meta name="citation_publication_date" content="2023-11-21" />
<meta property="article:published_time" content="2023-11-21" />
<meta name="dc.modified" content="2023-11-21T17:04:59+00:00" />
<meta property="article:modified_time" content="2023-11-21T17:04:59+00:00" />
<meta name="dc.language" content="en-US" />
<meta name="citation_language" content="en-US" />
<meta name="dc.relation.ispartof" content="Manubot" />
Expand Down Expand Up @@ -388,9 +388,9 @@
<meta name="citation_fulltext_html_url" content="https://yt-project.github.io/yt-4.0-paper/" />
<meta name="citation_pdf_url" content="https://yt-project.github.io/yt-4.0-paper/manuscript.pdf" />
<link rel="alternate" type="application/pdf" href="https://yt-project.github.io/yt-4.0-paper/manuscript.pdf" />
<link rel="alternate" type="text/html" href="https://yt-project.github.io/yt-4.0-paper/v/f24c12087aff187ded08b836953ef110b4b7faed/" />
<meta name="manubot_html_url_versioned" content="https://yt-project.github.io/yt-4.0-paper/v/f24c12087aff187ded08b836953ef110b4b7faed/" />
<meta name="manubot_pdf_url_versioned" content="https://yt-project.github.io/yt-4.0-paper/v/f24c12087aff187ded08b836953ef110b4b7faed/manuscript.pdf" />
<link rel="alternate" type="text/html" href="https://yt-project.github.io/yt-4.0-paper/v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/" />
<meta name="manubot_html_url_versioned" content="https://yt-project.github.io/yt-4.0-paper/v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/" />
<meta name="manubot_pdf_url_versioned" content="https://yt-project.github.io/yt-4.0-paper/v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/manuscript.pdf" />
<meta property="og:type" content="article" />
<meta property="twitter:card" content="summary_large_image" />
<link rel="icon" type="image/png" sizes="192x192" href="https://manubot.org/favicon-192x192.png" />
Expand Down Expand Up @@ -508,10 +508,10 @@ <h1 class="title">Introducing yt 4.0: Analysis and Visualization of Volumetric D
</header>
<p><small><em>
This manuscript
(<a href="https://yt-project.github.io/yt-4.0-paper/v/f24c12087aff187ded08b836953ef110b4b7faed/">permalink</a>)
(<a href="https://yt-project.github.io/yt-4.0-paper/v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/">permalink</a>)
was automatically generated
from <a href="https://github.com/yt-project/yt-4.0-paper/tree/f24c12087aff187ded08b836953ef110b4b7faed">yt-project/yt-4.0-paper@f24c120</a>
on November 20, 2023.
from <a href="https://github.com/yt-project/yt-4.0-paper/tree/04a9eb7f09be21b07f86135f0e4c4d0df51749ed">yt-project/yt-4.0-paper@04a9eb7</a>
on November 21, 2023.
</em></small></p>
<h2 id="authors">Authors</h2>
<ul>
Expand Down Expand Up @@ -2494,11 +2494,15 @@ <h3 id="sec:sph-analysis">SPH Analysis</h3>
However, with SPH data, the selection methods in 2D and 3D will always include those particles whose spheres of influence, defined by the appropriate smoothing lengths, are within or overlapping with the data selector.
This is somewhat counter to the expectations set by the grid codes, but aligns with the need to have a fully self-contained data-container for computing field values.
For instance, this means that a “ray” object (often used to compute, for instance, the column density in a cosmological simulation) will in fact include a set of particles within a (potentially) varying impact parameter.
This can be seen in diagram form in Figure <a href="#fig:sph_ray_tracing">11</a>.</p>
This can be seen in diagram form in Figure <a href="#fig:sph_ray_tracing">11</a>.
We note that, as described in the SPLASH method paper <span class="citation" data-cites="1A6gLV5Q0">[<a href="#ref-1A6gLV5Q0" role="doc-biblioref">8</a>]</span>, the kernel interpolation can be computed using the (dimensionless) ratio between the impact parameter of the ray and the smoothing length of the particle.</p>
<canvas id="sph-ray-figure" style="width:100%;height:100%;min-height: 500px;" hidpi="true">
</canvas>
<script type="text/paperscript" canvas="sph-ray-figure" src="images/sph_ray_tracing.js"></script>
<div id="fig:sph_ray_tracing" class="fignos">
<figure>
<img src="images/sph_ray_tracing_diagram.svg" alt="Figure 11: A cartoon diagram of a ray passing through a collection of particles. The radius of the particle is indicative of its smoothing length (values should not be interpreted to be constant within these circles!). As can be seen, the individual particles each contribute different amounts as a result of their smoothing length, the chord-length as the ray passes through the circle, and the values within each particle." />
<figcaption aria-hidden="true"><span>Figure 11:</span> A cartoon diagram of a ray passing through a collection of particles. The radius of the particle is indicative of its smoothing length (values should <em>not</em> be interpreted to be constant within these circles!). As can be seen, the individual particles each contribute different amounts as a result of their smoothing length, the chord-length as the ray passes through the circle, and the values within each particle.</figcaption>
<img src="images/blank.svg" width="1" alt="Figure 11: A cartoon diagram of a ray passing through a collection of particles. The radius of the particle is indicative of its smoothing length. As can be seen, the individual particles each contribute different amounts as a result of their smoothing length, the chord-length as the ray passes through the circle, and the values within each particle." />
<figcaption aria-hidden="true"><span>Figure 11:</span> A cartoon diagram of a ray passing through a collection of particles. The radius of the particle is indicative of its smoothing length. As can be seen, the individual particles each contribute different amounts as a result of their smoothing length, the chord-length as the ray passes through the circle, and the values within each particle.</figcaption>
</figure>
</div>
<p>Other than these differences, which have been intentionally made to align the results with the expected results from the underlying discretization method, the APIs for access to particle data and finite volume data are identical, and they provide broadly identical functionality, where the disparities are typically in functionality such as volume rendering.
Expand Down
Binary file modified manuscript.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/images/blank.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions v/04a9eb7f09be21b07f86135f0e4c4d0df51749ed/images/github.svg
Loading

0 comments on commit e089d20

Please sign in to comment.