Comments (9)
cone primitive could be specified with two radii values and a height.
from source.
Cone primitive is now mostly working. Need to fix a bug where it fails at a certain angle.
from source.
Completed in commit 52c724e.
from source.
Closed prematurely
from source.
There appears to be a bug in the cone code, it does not appear to populate the next_intersection cache in the hit() method.
from source.
I found another problem with the cone. Turns out the new code section to detect the tip and base wasn't being run. Line 287 was commented out. Instead it was only using the crude method that moves the hit point in the negative direction of the surface normal. Lines 289-291. Anyway, the crude method was working fine but I know you would prefer to use the more robust method.
When I tried to run the more robust code, it failed to work again. I added some print statements to see when the cone tip and cone base segments are running, because the are really rare and should rarely be running. Turns out the cone tip code is running for nearly every ray. I added some debugging code on lines 312-316. Here is some sample output
cone tip
cone_height = 0.3
hit_point.z = 0.5213630038403056
diff = -0.22136300384030566
How can the hit_point in local space have a z greater than the cone height? That doesn't make sense. It should be between zero and the height.
from source.
The problem seems to be due to the z coordinate. Original calculation for interior point:
old_radius = sqrt(hit_point.x**2 + hit_point.y**2)
new_radius = old_radius - EPSILON
scale = new_radius/old_radius
x = scale * hit_point.x
y = scale * hit_point.y
z = hit_point.z
Keeping the z coordinate the same is what is causing the problem. It needs to move inwards like the others. Becomes:
z = hit_point.z - EPSILON * normal.z
from source.
Handing over to Alex to finish.
from source.
Cone added in commit 6770010
from source.
Related Issues (20)
- beyond uniform integration step in inhomogeneous.pyx
- raysect.org doesn't support https HOT 5
- Cherab development branch is incompatible with Raysect development branch due to material API changes HOT 1
- Typo of Error message in vector3d.autowrap_function2d/3d ?
- Installation from sdist on PyPI fails if cython and numpy are not already installed HOT 1
- Assigning to spectrum.samples breaks spectrum integrity HOT 1
- Allow Ray.extinction_min_depth to be equal to 1 HOT 2
- The 'quiet' argument passed to Observer1D and Observer2D at initialisation is ignored. HOT 1
- Proposal: material library update HOT 2
- SpectralPowerPipeline2D cannot be unpickled HOT 2
- Non-uniform step, absorption & scattering: inhomogeneous.pxd HOT 1
- Non-uniform step, absorption & scattering: inhomogeneous.pyx HOT 1
- Proposal: adaptive integration HOT 2
- Proposal: inhomogeneous absorption HOT 2
- Proposal: volumetric scattering HOT 1
- Update demos to support latest changes in Raysect and Matplotlib HOT 1
- Support parallel builds when installing with pip? HOT 4
- Publish manylinux wheel for Python 3.10 HOT 1
- Cython 3.0 compile error
- Cython 3.0 incompatible issue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from source.