Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
naavis committed Jul 8, 2019
2 parents aabe960 + b4095dd commit dba7ab5
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 33 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.1.1 - 2019-07-08

### Fixed
- Fixed bug where removing the only crystal population caused the UI controls not to work anymore

## 2.1.0 - 2019-07-07

### Added
Expand All @@ -15,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made sidebar scrollable when the window is small enough
- Made UI show field of view in degrees
- Limited field of view for stereographic, rectilinear and orthographic projections

### Fixed
- Fixed bug where field of view sometimes did not update correctly when choosing a new projection

## 2.0.0 - 2019-07-02
Expand All @@ -25,9 +32,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 1.1.0 - 2019-06-17

### Changed
- Renamed C-axis orientation to simply C-axis tilt

### Fixed
- Fixed bug where uniform C-axis orientation was messing with C-axis rotation
- Renamed C-axis orientation to simply C-axis tilt

## 1.0.0 - 2019-06-16

Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Here are some general settings for the whole simulation.

- **Sun altitude:** Sun altitude from the horizon in degrees
- **Sun diameter:** Angular diameter of the sun in degrees
- **Rays per frame:** Number of traced rays per rendered frame
- **Rays per frame:** Number of rays traced through individual crystals per
rendered frame
- If the user interface slows down a lot during rendering, lower this value
- On an NVIDIA GeForce GTX 1070 a good value seems to be 500 000 - 1 000 000
- The maximum value for this parameter may be limited by your GPU
Expand All @@ -46,17 +47,18 @@ HaloRay allows you to simulate multiple different ice crystal populations
simultaneously. You give each population a name for easier reference by typing
in the **Crystal population** dropdown menu. Each population has a relative
weight, which can be changed by adjusting the **Population weight** spin box.
For example, giving weight 1 and 3 to two crystal populations would trace three
times as many rays through the latter population than the former.
For example, giving weights 1 and 3 to two crystal populations respectively
would trace three times as many rays through the latter population than the
former.

The crystals are hexagonal, and have three named axes as shown in the image
below.

![Graphic of the different crystallographic axes](images/crystal-axes.png)

The orientation of the ice crystals in each population are defined by two
parameters: tilt of the crystal around the **a**-axis and rotation around the
**c**-axis. For each parameter you can currently choose between two different
parameters: tilt of the crystal around the A-axis and rotation around the
C-axis. For each parameter you can currently choose between two different
random distributions: a uniform distribution and a Gaussian distribution. For
the Gaussian distribution you can choose an average angle and the standard
deviation of the distribution.
Expand All @@ -75,16 +77,16 @@ known to happen in nature.
The shape of the crystal can also be adjusted by changing the following
parameters:

- **C/A ratio average:** Ratio between the **c**-axis and **a**-axis lengths of
- **C/A ratio average:** Ratio between the C-axis and A-axis lengths of
of the crystal
- **C/A ratio std:** Standard deviation of the C/A ratio

![Graphic of plate and column crystals](images/plate-column.png)

Crystals with a large C/A ratio are look like pencil pieces, and are commonly
called column crystals. Column crystals tend to orient themselves with the
**c**-axis horizontal. Crystals with a small C/A ratio are called plate
crystals. They tend to orient themselves with the **c**-axis vertical. Both
C-axis horizontal. Crystals with a small C/A ratio are called plate
crystals. They tend to orient themselves with the C-axis vertical. Both
kinds of crystals are shown in the image above.

### View settings
Expand Down Expand Up @@ -147,7 +149,9 @@ Appveyor CI server.

## Acknowledgments

- @lkangas for providing tons of reading material related to this topic
- @pnuu for additional Linux support
- [Lauri Kangas](https://github.com/lkangas) for providing tons of reading material and debugging help
- [Panu Lahtinen](https://github.com/pnuu) for additional Linux support
- Jukka Ruoskanen for making HaloPoint 2.0 back in the day and inspiring me to start working on HaloRay
- [Jaakko Lehtinen](https://users.aalto.fi/~lehtinj7/) for super valuable lessons in computer graphics
- [Nuklear](https://github.com/vurtun/nuklear/) for enabling me get this project
off the ground
7 changes: 6 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.1.0-{build}'
version: '2.1.1-{build}'
branches:
only:
- master
Expand All @@ -17,7 +17,12 @@ artifacts:
- path: '*.zip'
deploy:
- provider: GitHub
release: HaloRay $(appveyor_build_version)
artifact: /.*\.zip/
draft: true
description: ''
skip_tags: true
auth_token:
secure: pb9keaNklmNgmLaw1doReZDdP5Oh/pLZPdwjt+anpcoi34MyqAbFoJbiHJMcWkgD
on:
branch: master
5 changes: 1 addition & 4 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
$ErrorActionPreference = "Stop";

$gitBranch = $env:APPVEYOR_REPO_BRANCH
$gitBranch
$extraParameters = if ($gitBranch -eq "master") {
"-DHALORAY_VERSION='${env:APPVEYOR_BUILD_VERSION}'"
} else {
""
}

$extraParameters

pushd
mkdir build
cd build
Expand All @@ -29,4 +26,4 @@ cd .\src\Release\
-no-system-d3d-compiler `
--release `
haloray.exe
popd
popd
13 changes: 6 additions & 7 deletions src/gui/crystalModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,18 @@ void CrystalModel::addRow()
{
auto row = mCrystals->GetCount();
beginInsertRows(QModelIndex(), row, row);

bool success = mCrystals->AddDefault();

mCrystals->AddDefault();
endInsertRows();
}

bool CrystalModel::removeRow(int row)
{
beginRemoveRows(QModelIndex(), row, row);

bool success = mCrystals->Remove(row);
if (mCrystals->GetCount() <= 1)
return false;

beginRemoveRows(QModelIndex(), row, row);
mCrystals->Remove(row);
endRemoveRows();

return success;
return true;
}
10 changes: 2 additions & 8 deletions src/simulation/crystalPopulationRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ unsigned int CrystalPopulationRepository::GetCount() const
return (unsigned int)mCrystals.size();
}

bool CrystalPopulationRepository::AddDefault()
void CrystalPopulationRepository::AddDefault()
{
mCrystals.push_back(DefaultCrystalPopulation());
mWeights.push_back(1);
return true;
}

bool CrystalPopulationRepository::Remove(unsigned int index)
void CrystalPopulationRepository::Remove(unsigned int index)
{
if (mCrystals.size() == 1)
return false;

mCrystals.erase(mCrystals.begin() + index);
mWeights.erase(mWeights.begin() + index);

return true;
}

CrystalPopulation &CrystalPopulationRepository::Get(unsigned int index)
Expand Down
4 changes: 2 additions & 2 deletions src/simulation/crystalPopulationRepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class CrystalPopulationRepository
{
public:
CrystalPopulationRepository();
bool AddDefault();
bool Remove(unsigned int index);
void AddDefault();
void Remove(unsigned int index);
CrystalPopulation &Get(unsigned int index);
double GetProbability(unsigned int index) const;
unsigned int GetWeight(unsigned int index) const;
Expand Down

0 comments on commit dba7ab5

Please sign in to comment.