Skip to content

Commit

Permalink
[1.3.24] 2024-11-27
Browse files Browse the repository at this point in the history
* Added utilities/dependencies.sh script to automatically install all dependent libraries on Linux and MacOS. Credit to Sean Banks for creating this script.

*Context*
- Seemed to still have an issue with tube objects, where there was severe twisting.

*Plant Architecture*
- Numerous model improvements via parameter tuning and texture adjustments
- Added rice, maize, and walnut models
- Changed map structures that hold organ prototypes to use the prototype function pointer as the key rather than a string, which allows different prototypes along a single shoot.
- Peduncles were not correctly lining up with their parent petioles.

*Radiation*
- Error corrected in radiation camera documentation example code.

*Photosynthesis*
- Updated code to include stomatal sidedness option (this was already described in the documentation, although it had not been implemented).

Co-authored-by: Sean Banks <[email protected]>
  • Loading branch information
bnbailey-psl and smbanx committed Nov 27, 2024
1 parent eac7abc commit f4e8f8c
Show file tree
Hide file tree
Showing 883 changed files with 45,076 additions and 43,631 deletions.
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ If you have comments or suggestions, please feel free to [open an issue](https:/

Documentation source files for the Helios core can be found in `doc/UserGuide.dox`, and for each plugin in the corresponding plug-in directory sub-folder `doc/*.dox`. These files are written in [Doxygen](https://www.doxygen.nl/index.html) format. Additionally, documentation for data structures, functions, methods, etc. is written directly in the corresponding header file, and also uses Doxygen syntax.

If you edit the documentation and want to view the changes, you can build the documentation HTML files. To do this, you need to have Doxygen installed on your system. Then, navigate to the Helios root directory and run:
If you edit the documentation and want to view the changes, you can build the documentation HTML files. To do this, you need to have Doxygen, LaTeX and ghostscript installed on your system. For Linux:

```bash
sudo apt-get install doxygen texlive-full ghostscript
```

To build the documentation, navigate to the Helios root directory and run:

```bash
doxygen doc/Doxyfile
Expand Down
76 changes: 40 additions & 36 deletions core/src/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3630,16 +3630,17 @@ void Tube::appendTubeSegment( const helios::vec3 &node_position, float node_radi
if (rotation_axis.magnitude() > 1e-6) {
float angle = acos(std::clamp(previous_axial_vector * axial_vector, -1.0f, 1.0f));
previous_radial_dir = rotatePointAboutLine(previous_radial_dir, nullorigin, rotation_axis, angle);
} else {
// Handle the case of nearly parallel vectors
// Ensure previous_radial_dir remains orthogonal to axial_vector
previous_radial_dir = cross(axial_vector, previous_radial_dir);
if (previous_radial_dir.magnitude() < 1e-6) {
// If still degenerate, choose another orthogonal direction
previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
}
previous_radial_dir.normalize();
}
// else {
// // Handle the case of nearly parallel vectors
// // Ensure previous_radial_dir remains orthogonal to axial_vector
// previous_radial_dir = cross(axial_vector, previous_radial_dir);
// if (previous_radial_dir.magnitude() < 1e-6) {
// // If still degenerate, choose another orthogonal direction
// previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
// }
// previous_radial_dir.normalize();
// }
}

previous_axial_vector = axial_vector;
Expand Down Expand Up @@ -3750,16 +3751,17 @@ void Tube::appendTubeSegment(const helios::vec3 &node_position, float node_radiu
if (rotation_axis.magnitude() > 1e-6) {
float angle = acos(std::clamp(previous_axial_vector * axial_vector, -1.0f, 1.0f));
previous_radial_dir = rotatePointAboutLine(previous_radial_dir, nullorigin, rotation_axis, angle);
} else {
// Handle the case of nearly parallel vectors
// Ensure previous_radial_dir remains orthogonal to axial_vector
previous_radial_dir = cross(axial_vector, previous_radial_dir);
if (previous_radial_dir.magnitude() < 1e-6) {
// If still degenerate, choose another orthogonal direction
previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
}
previous_radial_dir.normalize();
}
// else {
// // Handle the case of nearly parallel vectors
// // Ensure previous_radial_dir remains orthogonal to axial_vector
// previous_radial_dir = cross(axial_vector, previous_radial_dir);
// if (previous_radial_dir.magnitude() < 1e-6) {
// // If still degenerate, choose another orthogonal direction
// previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
// }
// previous_radial_dir.normalize();
// }
}

previous_axial_vector = axial_vector;
Expand Down Expand Up @@ -4791,16 +4793,17 @@ uint Context::addTubeObject(uint radial_subdivisions, const std::vector<vec3> &n
if (rotation_axis.magnitude() > 1e-6) {
float angle = acos(std::clamp(previous_axial_vector * axial_vector, -1.0f, 1.0f));
previous_radial_dir = rotatePointAboutLine(previous_radial_dir, nullorigin, rotation_axis, angle);
} else {
// Handle the case of nearly parallel vectors
// Ensure previous_radial_dir remains orthogonal to axial_vector
previous_radial_dir = cross(axial_vector, previous_radial_dir);
if (previous_radial_dir.magnitude() < 1e-6) {
// If still degenerate, choose another orthogonal direction
previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
}
previous_radial_dir.normalize();
}
// else {
// // Handle the case of nearly parallel vectors
// // Ensure previous_radial_dir remains orthogonal to axial_vector
// previous_radial_dir = cross(axial_vector, previous_radial_dir);
// if (previous_radial_dir.magnitude() < 1e-6) {
// // If still degenerate, choose another orthogonal direction
// previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
// }
// previous_radial_dir.normalize();
// }
}

previous_axial_vector = axial_vector;
Expand Down Expand Up @@ -4921,16 +4924,17 @@ uint Context::addTubeObject(uint radial_subdivisions, const std::vector<vec3> &n
if (rotation_axis.magnitude() > 1e-6) {
float angle = acos(std::clamp(previous_axial_vector * axial_vector, -1.0f, 1.0f));
previous_radial_dir = rotatePointAboutLine(previous_radial_dir, nullorigin, rotation_axis, angle);
} else {
// Handle the case of nearly parallel vectors
// Ensure previous_radial_dir remains orthogonal to axial_vector
previous_radial_dir = cross(axial_vector, previous_radial_dir);
if (previous_radial_dir.magnitude() < 1e-6) {
// If still degenerate, choose another orthogonal direction
previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
}
previous_radial_dir.normalize();
}
// else {
// // Handle the case of nearly parallel vectors
// // Ensure previous_radial_dir remains orthogonal to axial_vector
// previous_radial_dir = cross(axial_vector, previous_radial_dir);
// if (previous_radial_dir.magnitude() < 1e-6) {
// // If still degenerate, choose another orthogonal direction
// previous_radial_dir = cross(axial_vector, vec3(1.0f, 0.0f, 0.0f));
// }
// previous_radial_dir.normalize();
// }
}

previous_axial_vector = axial_vector;
Expand Down
21 changes: 20 additions & 1 deletion doc/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -1966,4 +1966,23 @@ The radiation model has been re-designed, with the following primary additions:
- Error fixed when parsing XML files for strawberry canopies. Thanks to Heesup Yun for the fix.

*Radiation*
- Error corrected in the camera model related to the field of view and aspect ratio. Thanks to Peng Wei for this fix.
- Error corrected in the camera model related to the field of view and aspect ratio. Thanks to Peng Wei for this fix.

[1.3.24] 2024-11-27

* Added utilities/dependencies.sh script to automatically install all dependent libraries on Linux and MacOS. Credit to Sean Banks for creating this script.

*Context*
- Seemed to still have an issue with tube objects, where there was severe twisting.

*Plant Architecture*
- Numerous model improvements via parameter tuning and texture adjustments
- Added rice, maize, and walnut models
- Changed map structures that hold organ prototypes to use the prototype function pointer as the key rather than a string, which allows different prototypes along a single shoot.
- Peduncles were not correctly lining up with their parent petioles.

*Radiation*
- Error corrected in radiation camera documentation example code.

*Photosynthesis*
- Updated code to include stomatal sidedness option (this was already described in the documentation, although it had not been implemented).
20 changes: 19 additions & 1 deletion doc/UserGuide.dox
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! \mainpage Helios Documentation v1.3.23
/*! \mainpage Helios Documentation v1.3.24

<p> <br> </p>

Expand Down Expand Up @@ -175,6 +175,20 @@ $ git pull

As Helios is simply C++ code, it can be used on any platform that supports C++ programming. If you prefer to use an interactive development environment (IDE), two great options are <a href="https://www.jetbrains.com/clion/">CLion</a> by JetBrains (recommended) and <a href="https://code.visualstudio.com">VS Code</a>. These IDEs are available on Windows, Linux, and Mac, and make setting up Helios projects relatively easy. CLion is free for educational purposes, and is loaded with very nice features for C++ development such as direct display of Helios documentation. VS Code also works, but is a little more clunky. Building and compiling from the command-line and using any text editor such as Vim or Emacs also works just fine.

\subsubsection Automatically Installing Helios Dependencies

Running Helios requires several dependent packages to be installed, depending on the plug-ins you are using. The sections below detail manual installation of dependent packages for Windows, Linux, and MacOS.

For Linux and MacOS, there is also a script that can be used to install all required packages for all plugins automatically, simply run the following shell script 'utilities/dependencies.sh' with the argument "ALL" (or with no arguments) as follows: `source dependencies.sh`

There are a few additional options for installing dependencies if it is not necessary to use all plugins.

To install only the dependencies required to run Helios with no plugins (or plugins that require no packages), use the argument "BASE": `source dependencies.sh BASE`

To install only the dependencies required to run Helios with the visualizer plugin, use the argument "VIS": `source dependencies.sh VIS`

To install only the dependencies required to run Helios with CUDA (required for the Radiation, Energy Balance, LiDAR, Aerial LiDAR, and Voxel Intersection plugins), use the argument "CUDA": `source dependencies.sh CUDA`

\section SetupPC Set-up on Windows PC

\subsection SetupPCMSVC Install Microsoft Visual Studio C++ compiler tools
Expand Down Expand Up @@ -227,6 +241,10 @@ $ git pull

OptiX is normally packaged with Helios, such that you do not have to worry about installing it. However, if you are using Windows Subsystem for Linux (WSL), you will need to manually install OptiX since the version included with Helios does not have the required drivers for WSL. You can follow the instructions on this site to perform the installation: <a href="https://forums.developer.nvidia.com/t/problem-running-optix-7-6-in-wsl/239355/7">https://forums.developer.nvidia.com/t/problem-running-optix-7-6-in-wsl/239355/7</a>.

Alternatively, simply run the dependencies script found in the utilities/ folder: `source dependencies.sh`

This will automatically install and configure the Linux drivers (version 470.256.02) to run OptiX.

\section SetupLinux Set-up on Linux

\subsection SetupLinuxCLion Setting up basic build functionality
Expand Down
2 changes: 1 addition & 1 deletion doc/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="Helios_logo_small.png"/></td>
<td id="projectalign">
<div id="projectname"><span id="projectnumber">&#160;v1.3.23</span>
<div id="projectname"><span id="projectnumber">&#160;v1.3.24</span>
</div>
</td>
</tr>
Expand Down
Loading

0 comments on commit f4e8f8c

Please sign in to comment.