Skip to content

Commit

Permalink
Fix typos + add CI (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryngelson authored Feb 25, 2024
1 parent e245f09 commit 238f015
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 30 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: LinkChecker

on: push

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: 'mlc_config.json'
15 changes: 15 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Spell Check
on:
push:
workflow_dispatch:

jobs:
run:
name: Spell Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Spell Check
uses: crate-ci/typos@master
13 changes: 13 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[default]
extend-ignore-identifiers-re = [
"AttributeID.*Supress.*",
]

[default.extend-identifiers]
AttributeIDSupressMenu = "AttributeIDSupressMenu"

[default.extend-words]
Daa = "Daa"

[files]
extend-exclude = ["Resources/"]
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Scientific Visualization

This repository contains a collection of useful Paraview skills for scientific visualization that I've developed and condensed into one place.
I've made generous use of the default MacOS keyboard shortcuts in this collection for brevity.
I've used the default MacOS keyboard shortcuts in this collection for brevity.
If you are using a different operating system, the corresponding shortcuts can easily be found via a quick Google search.
I've also assumed that anyone using this collection has the most recent version of Paraview.

## Table of Contents

### The Basics

[Three Steps to Nicer Visualization](Tutorials/three-steps-to-nice-visualization.md)

[Creating an Annimation](Tutorials/creating-an-annimation.md)
[Creating an Animation](Tutorials/creating-an-annimation.md)

### General Visualization

[Contours/Isosurfaces](Tutorials/contours.md)

### Volume Rendering

Coming soon!

### Ray Tracing

Coming soon!

Have something to contribute? See the contributing guidelines [Here](contributing.md)
Have something to contribute? See the contributing guidelines [here.](contributing.md)
24 changes: 12 additions & 12 deletions Tutorials/contours.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Contours
Contours (and isosurfaces) can be very usefull in scientific visualization.
In order to create contors in Paraview, you must first have point data.
If your data is cell data, the `Cell Data to Point Data` filter must be applied.
Contours (and isosurfaces) can be very useful in scientific visualization.
To create contours in Paraview, you must first have point data.
The `Cell Data to Point Data` filter must be applied if your data is cell data.
After this, a `Contour` filter can be applied.
The basic properties of a contour figure are shown below.

<img src="../Resources/contours/A.png" alt="drawing" width="40%"/>

- Contour by is the variable contours will be taken over
- Isosurfaces is the list of values for which contours will be made at.
You can add and remove contour values by using the plus and minus buttons.
Also note that the value range can be used to help select contour values.
- Isosurfaces is the list of values for which contours will be made.
You can add and remove contour values using the plus and minus buttons.
Also, note that the value range can help select contour values.

## Usefull Settings
## Useful Settings

- Opacity: Make the contours slightly see through.
This can be usefull if you want to show contours of one variable over a 2D image of another variable.
- Opacity: Make the contours slightly see-through.
This can be useful if you want to show the contours of one variable over a 2D image of another variable.

- Line Width: Paraview's default linewidth of 1 pixel is often too thin.
- Line Width: Paraview's default linewidth of 1 pixel often needs to be thicker.
Increasing this makes your lines easier to see.

- Render Lines as Tubes: This renders lines as tubes and can make contours look better in 3D.

## Example
The following is an image of contours of velocity magnitude for a jet inpinging a solid wall.
The following is an image of contours of velocity magnitude for a jet impinging a solid wall.

<img src="../Resources/contours/B.png" alt="drawing" style="border-radius: 5%"/>
<img src="../Resources/contours/B.png" alt="drawing" style="border-radius: 5%"/>
19 changes: 11 additions & 8 deletions Tutorials/creating-an-annimation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Creating an Annimation
Annimations (videos) are a nice way to show the evolution of transient data over time.
This tutorial assumes that you have already opened a dataset that has multiple snapshots in time, selected a colorbar for your data, and performed the steps in [Three Steps to Nicer Visualization](three-steps-to-nice-visualization.md).
# Creating an Animation

Animations (videos) are a nice way to show the evolution of transient data over time.
This tutorial assumes that you have already opened a dataset that has multiple snapshots in time, selected a color bar for your data, and performed the steps in [Three Steps to Nicer Visualization](three-steps-to-nice-visualization.md).

## Step 1 - Frame your data

If your data doesn't fill the render view in Paraview, it won't fill the video frame in your video.
The easiest way to make your data fill the frame is to click the Reset Camera Closest or Zoom Closest to Data buttons.

Expand All @@ -19,22 +21,23 @@ These buttons are to the top and right of the render view as shown below.
![image](../Resources/creatingAnAnnimation/C.png)

Once you have your data framed in a way you like, move on to Step 2 to save screenshots of each snapshot in your data.
An example of well framed data is shown below.
An example of well-framed data is shown below.

![image](../Resources/creatingAnAnnimation/D.png)

## Step 2 - Export Snapshots

Once your data is framed, you can save screenshots by clicking `file -> Save Annimation...`.
Once you give a filename, the following popup appears with a few usefull options.
Once you give a filename, the following popup appears with a few useful options.

<img src="../Resources/creatingAnAnnimation/E.png" alt="drawing" width="50%"/>

The following options let you control how Paraview saves snapshots:

- Image Resolution: As the name implies, this is the resolution the snapshots are saved at.
To preserve your well framed data, the ratio of pixels in each direction must stay the same.
- Image Resolution: As the name implies, this is the resolution of the snapshots.
To preserve your well-framed data, the ratio of pixels in each direction must stay the same.
It is also helpful to use an even number of pixels in both directions.
This makes post processing the images created by Paraview easier.
This makes post-processing the images created by Paraview easier.

- Override Color Palette: This gives you a few options for background colors.

Expand Down
17 changes: 10 additions & 7 deletions Tutorials/three-steps-to-nice-visualization.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Three Steps to Nicer Visualization

Advanced features like opacity mapping, ray tracing, and volume rendering can all be used to make nice renderings of scientific data.
However, there are three simple things yo u can do to turn the default settings in Paraview into visualizations that are nice enough to share with the outside world.
However, there are three simple things you can do to turn the default settings in Paraview into visualizations that are nice enough to share with the outside world.
This short set of tips will show you how to do this and get you started on making nice visualizations of scientific data.
To follow along with this tutorial, start by opening the Paraview state file `Resources/cubeAndSphere.pvsm` in the most recent version of Paraview.

## Change the default background color
Paraview's default background color is instantly recognizeable to anyone who uses the software regularly.
Paraview's default background color is instantly recognizable to anyone who uses the software regularly.
While there's nothing wrong with the default background color, changing it can indicate to others that you've put time and effort into making nice visualizations, and will often look better.
For all but a small subset of visualizations, a black or white background will look much nicer than the default gray background.
To change the background color, scroll to the bottom of the properties tab and unselect Use Color Palette for Background shown below.
Expand All @@ -17,20 +18,22 @@ To select a color, click the background dropdown shown below and use the resulti
![image](../Resources/threeStepsToNiceVisualization/B.png)

## Remove the orientation axis
The orientation axis is shown by default in the lower left hand corner of the reder view.

The orientation axis is shown by default in the lower left-hand corner of the rear view.
In many cases, it is not relevant to visualization and can be removed.
To do this, unselect Orientation Axis Visibility in the properties tab as shown below.

![image](../Resources/threeStepsToNiceVisualization/C.png)

## Remove the colorbar
## Remove the color bar

Knowing the values of the color bar is not always pertinent to scientific visualization.
If this is the case, it can be removed, yielding a cleaner visulation.
If this is the case, it can be removed, yielding a cleaner visualization.
This can be done by changing the visibility toggle in the properties tab as shown below.

![image](../Resources/threeStepsToNiceVisualization/D.png)

Note that each visible item in the pipeline broswer can have its color bar toggled on or off individually.
The render view after make these three changes is shown below.
Note that each visible item in the pipeline browser can have its color bar toggled on or off individually.
The render view after making these three changes is shown below.

![image](../Resources/threeStepsToNiceVisualization/E.png)
3 changes: 3 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"aliveStatusCodes": [417, 403, 200, 429, 206, 0]
}

0 comments on commit 238f015

Please sign in to comment.