Rays Emission from a shape (urgent)

hello developers,
I am using Optix for radiative heat transfer so far its going good, As we know that in ray tracing rays are emitted from a single point (camera) and travels according to the specified direction, In my task I want to emit rays not from a point but from a whole regular shape (like square or triangle), so that i can transfer some data through these rays transferred from source to destination.

You can write a ray generation program to do that. Although the OptiX examples mostly use a pinhole camera, nothing about OptiX requires that all rays be emitted from a single point.

thank you for your reply, can you please give me an example if i want to emit a ray from a square?

I think that Detlef’s suggestion should point you in the right direction. A basic approach is to choose random u- and v-cooridnates on the sqaure as origin points for your samples. You should definitely read up on Monte Carlo methods. It sounds like you might be trying to implement the Nusselt approximation for view factors, or something similar to that.