Model a Fresnel lensBRL-CAD
Status: ClosedTime to complete: 48 hrs Mentors: SeanTags: 3D, modeling, rendering

Model a Fresnel lens in BRL-CAD.

Your model should define one or more regions and be free of modeling errors such as overlaps.  Submit your .g file and a 1024x1024 rendering.

References:

  • http://brlcad.org/wiki/Documentation (see the MGED tutorial and cheat sheets)
  • rt -s1024 -A0.75 -c {set ambSamples=128}  (will make a nice rendering)
  • rtcheck  (checks for overlaps)

 

Uploaded Work
File name/URLFile sizeDate submitted
Lensp.PNG406.5 KBDecember 17 2012 09:51 UTC
lensperfect18.9 KBDecember 17 2012 09:51 UTC
plastic.PNG409.4 KBDecember 17 2012 12:20 UTC
Hollow + Base.PNG430.5 KBDecember 17 2012 12:21 UTC
Rings.PNG387.5 KBDecember 17 2012 12:22 UTC
lens latest.PNG213.5 KBDecember 17 2012 15:07 UTC
frensellens.g6.4 KBDecember 17 2012 15:09 UTC
New.PNG337.1 KBDecember 18 2012 12:20 UTC
Lens.g19.0 KBDecember 18 2012 12:21 UTC
Comments
Sharanon December 12 2012 18:37 UTCCan you give some references

More on how the lens looks


Should we use CSG in this? would it be better?

Sean on December 13 2012 15:14 UTCheh, yes

I'd be very surprised if you figured out how to model a Fresnel lens in BRL-CAD without CSG.


Using CSG is expected. ;)


 

Sharanon December 17 2012 09:00 UTCTask Claimed

I would like to work on this task.

Andrei Popescu on December 17 2012 09:36 UTCTask Assigned

This task has been assigned to Sharan. You have 48 hours to complete this task, good luck!

Sharanon December 17 2012 09:51 UTCReady for review

The work on this task is ready to be reviewed.

Sharanon December 17 2012 09:52 UTCDone

Made this yesterday but claimed today.


was waiting for my previous work to be reviewed

Daniel Rossberg on December 17 2012 11:55 UTCYour lens isn't solid

As far as I can see your lens is hollow.  And I don't think that an elliptical torus is the right shape.


I would recommend to use a usual lense shape (section of a sphere or ellipsoid?), cut these shape with cylinders into rings and shift these rings to a Fresnel lens.

Daniel Rossberg on December 17 2012 11:55 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Sharanon December 17 2012 12:20 UTCMisunderstanding

I think you might have misunderstood the rendered image beacuse it is made up of glass.


Check out the plastic.png which is made up of plastic.


I was aware of the lens being hollow, So i added rings and a base.


You can check out the Hollow + Base.png, where there are no rings.


If you want to see the rings checkout the Ring.png.


 


Checkout the lensperfect.g file also


And  B llens1 llens2 llens3 llens4 llens5 llens6, for the rings.


B lens1 lens2 lens3 lens4 lens5 lens6, for the Elliptical Torus which i used


B base, for the base.

Sharanon December 17 2012 12:22 UTCReady for review

The work on this task is ready to be reviewed.

Daniel Rossberg on December 17 2012 12:30 UTCI checked the BRL-CAD file

lensperfect (with missing .g ;)  And there I saw that the rings are hollow. You modelled the boundery from an elliptical torus, the intersction of two cylinders and a baseplate.  However, a Fresnel lens is solid.  There is no air in the rings.

Daniel Rossberg on December 17 2012 12:31 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Sharanon December 17 2012 15:10 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 17 2012 15:17 UTCcreate the corresponding lens

Sharan, make the lens out of just ELL and RCC primitives.  I don't believe a torus is not going to provide the right surface curvature (prove me wrong).  See this link on lenses in general including the two slides near the end on Fresnel lenses: http://www.colorado.edu/physics/phys1230/phys1230_fa12/chapter3lensequation.pdf


 

Sharanon December 17 2012 15:26 UTCUpdate

I just made the frensellens.g out of sphere and rcc

Sean on December 17 2012 16:03 UTCbetter

Sharan, that's better but still has a few issues.  A sphere is an ELL so that part is good.  There should, however, be just one instance of the lens surface, i.e., one sphere, that is reused.  Instead of making a sph1, sph2, ..., model the lens using just one sph.  The way to do that is to apply a matrix where the sph is used (i.e., inside your lens1, lens2, lens3 combinations) using either the matrix editor (gui) or oed command (text). There's an extensive oed tutorial at http://brlcad.org/wiki/Documentation if you've not yet learned how to do that.  By using just one primitive, it lets us change the curvature of the lens by just changing one object instead of the N copies that were manually made.


The other issue is the spacing.  It looks like you picked arbitrary facet spacings, but there are actually a number of considerations when modeling a real lens.  Unlike the primitive diagram tasks, this model needs to be precise and accurate.


That said, I found measurements for a real lens provided in this paper:


http://www.colorado.edu/physics/phys1230/phys1230_fa12/chapter3lensequation.pdf


See figure 3.2 (page 13) for an overview of what it looks like.  Try making it exactly to those specifications, which are itemized in table 3.2 (page 12) on the preceding page.  See if you can model that perfectly.


 

Sean on December 17 2012 16:03 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Sharanon December 17 2012 17:01 UTCExtension

I might need a extension

Sharanon December 18 2012 12:21 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 18 2012 15:17 UTCwrong link

Sharan, so that looks a lot better, but you should have mentioned that the link I provided didn't actually give you measurements for a real lens!  Where's figure 3.2 and table 3.2??  That URL was supposed to be: http://www.osti.gov/bridge/servlets/purl/120927-64DD1o/webviewable/120927.pdf


The matrix over and reuse of lens1 looks good.  Fixing the opaque shader you left it at (why?), making it instead be transmissive glass, here's what your lens looks like with an object behind it:


http://brlcad.org/tmp/fresnel_havoc.png


Pretty neat!  It's the right idea!


That said, it's desirable to have the measurements match something specific.  You've put in reasonable effort, though, figuring this out already so we'll make that into a separate task to match the specific measurements in that paper.

Sean on December 18 2012 15:23 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 18 2012 15:24 UTCfrensel

Also meant to ask -- what's a "frensel"?  You made that mistake in a couple places.


A follow-on task has been posted here if you're interested:


http://www.google-melange.com/gci/task/view/google/gci2012/8125202


 

Sharanon December 18 2012 15:42 UTCMeasurement

I measured the figure with a physical ruler on my screen ;-)


so i managed to make it much more accurate.

Sean on December 18 2012 15:48 UTCExcept that was just a notional diagram

Except that the colorado.edu presentation was merely a notional diagram and it wasn't on page 12 or 13 ... and no table 3.2 anywhere.  You shouldn't ignore details like that!  Something was clearly wrong.  Still, thank you for your efforts.  Hopefully it's a learning experience for other tasks.