[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] openGL og Volume Rendering



Lars Riisgaard Ribe skrev:

> Det betyder, at jeg har et 3D datasæt ( et 3D billede),
> som jeg vil kunne lave et 3D billede af. Det skal laves
> således, at de mørke områder er transparente, hvorimod de
> lyse områder ikke er.

Hvis vi ser bort fra eventuelle transformationer af
billedet, så kan det vel klares med (uafprøvet Ada-kode):

   type Model is array (X_Range, Y_Range, Z_Range) of Scalar;
   type Image is array (X_Range, Y_Range) of Scalar;

   procedure Render (Data : in     Model;
                     As   :    out Image) is
   begin
      for X in Model'Range (1) loop
         for Y in Model'Range (2) loop
            Image (X, Y) := 1.0;
            for Z in Model'Range (3) loop
               Image (X, Y) := Image (X, Y) * Model (X, Y, Z);
            end loop;
         end loop;
      end loop;
   end Render;

Så kan det godt nok tænkes at du vil tage den
Model'Length (3). rod af værdierne i Image, før du viser
dem.  Ellers får du en opløsningsafhængig effekt i hvordan
gennemsigtigheden varierer.

Du kan selvfølgelig også lave ting med andre projektioner
end den simple parallelle projektion jeg bruger i eksemplet
ovenfor.

Jacob
-- 
"[...] *transfer* a bit of salary from the person who writes
 a bug to the person that finds a bug..." -- Keith Ray



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *