Skip to content

Commit

Permalink
Periodic boundary conditions seems to be working (currently only Simpson
Browse files Browse the repository at this point in the history
integration is supported). Refactored it into Heterogenous medium
plugin. Notebook of 1D cloud now works with orthographic projection
instead of radiance.
  • Loading branch information
root committed May 28, 2017
1 parent 33d0ce9 commit 1f5aefa
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 927 deletions.
9 changes: 1 addition & 8 deletions include/mitsuba/render/shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,7 @@ class MTS_EXPORT_RENDER Shape : public ConfigurableObject {
// =============================================================
//! @{ \name Query functions to be implemented in subclasses
// =============================================================


// Return X periodic boundary condition (True/False)
virtual bool xPeriodic() const;

// Return Y periodic boundary condition (True/False)
virtual bool yPeriodic() const;


/// Return the name of this shape (e.g. the filename)
virtual std::string getName() const;

Expand Down
1 change: 1 addition & 0 deletions notebooks/.ipynb_checkpoints/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/test_i3rc-checkpoint.ipynb
14 changes: 8 additions & 6 deletions notebooks/i3rc/scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@

# Create a sensor, film & sample generator
scene.addChild(pmgr.create({
'type' : 'radiancemeter',
'type' : 'orthographic',
'toWorld' : Transform.translate(Vector(0.25,0.25,1)) * Transform.scale(Vector(0.25,0.25,-1)) * Transform.rotate(Vector(0,0,1), 180.0),
'film' : {
'type' : 'mfilm',
'fileFormat' : 'numpy'
},
'fileFormat' : 'numpy',
'width' : 32
},
'sampler' : {
'type' : 'ldsampler',
'sampleCount' : 100
'sampleCount' : 100000
}
}))

Expand All @@ -72,6 +74,8 @@
scene.addChild(pmgr.create({
'type' : 'heterogeneous',
'method' : 'simpson',
'xBoundary' : 'periodic',
'yBoundary' : 'periodic',
'density' : voldata['case1'].getMitsubaParams(),
'albedo' : {
'type' : 'constvolume',
Expand All @@ -87,8 +91,6 @@
# Create medium bounding box
scene.addChild(pmgr.create({
'type' : 'cube',
'xPeriodic' : True,
'yPeriodic' : True,
'toWorld' : voldata['case1'].getWorldTransform(),
'interior' : scene.getMedia()[0]
}))
Expand Down
Loading

0 comments on commit 1f5aefa

Please sign in to comment.