News for hackers. Stuff that matters.

ashishuthama

Show HN: Optical Design and Simulation in Matlab

https://www.mathworks.com/help/images/optical-system-design-and-analysis.html

Hi HN, We have been working an optical design and simulation library as a small start-up-ish team within MathWorks (makers of MATLAB and Simulink).I have seen a few optics and MATLAB posts here, so figured this would be a good place to show case this.A quick link to all the 'good stuff' is in a reddit post with pretty pictures and links: ...

( Read More... | no comments | on HN )
'lobbing things' i.e launching things, OP didnt mean it would reach there in 30 days.
Re:Canon EF and RF Lenses – All Autofocus Motors on Monday March 10, 2025 @04:12PM (#43325497)
@ExAr - A treasure trove of information, thanks for putting in the effort!

Do you blog about how you go about creating these graphics? For example, this view finder image: https://exclusivearchitecture.com/images/technical-articles/... looks very impressive!

How do you simulate the rays+eye?

Re:Learn How to Tie Knots on Monday March 15, 2021 @01:40PM (#26469004)
same here. Was excited to see "Knot of the Day", thought I could add that to my RSS reader and look at one each day..could not find a way to do that.
A new engineer can learn a lot from being on code reviews earlyon. Anything from the team coding style to the application architecture.
Another data point: MATLAB, glnxa64 AVX2, 12 core

>> maxNumCompThreads(1);

>> im = randi(255, [2560, 1600, 3],'uint8');

>> timeit(@()imresize(im,[320,200],'bilinear','Antialiasing',false))

ans =

    0.0083
>> timeit(@()imresize(im,[320,200],'bilinear'))

ans =

    0.0301
>> maxNumCompThreads(6);

>> timeit(@()imresize(im,[320,200],'bilinear','Antialiasing',false))

ans =

    0.0062
>> timeit(@()imresize(im,[320,200],'bilinear'))

ans =

    0.0113

Oh, missed that lanczos2 part:

>> maxNumCompThreads(1);

>> timeit(@()imresize(im,[320,200],'lanczos2','Antialiasing',false))

ans =

    0.0146
>> maxNumCompThreads(6);

>> timeit(@()imresize(im,[320,200],'lanczos2','Antialiasing',false))

ans =

    0.0049

Since MATLAB tries to do most of the computation in double precision, its harder to extract much from SIMD.