Thread: A General GPU vectorized solid for Geant4

  1. #1
    Registered User Izak's Avatar
    Join Date
    May 2013
    Posts
    10

    A General GPU vectorized solid for Geant4

    Hi everyone,

    I would like to implement a unique solid which simulates the popular solids within CERN's geant4 project such as box, pipe, cylinder, cone, sphere etc. The idea is to have one type of solid, which is defined by N < Nmax linear half-spaces and M < Mmax quadratic half-spaces.

    First and foremost, to create a solid with the minimum number of planar surfaces, then a box ( adjusting the maximum, creating a 'constructor' for the new type of volume which actually builds a solid of the same CommonSolid type. )

    Secondly, add the capability for one (or later more) quadratic surfaces - allowing the creation of a Tube (first), then Cone and Cylinder.

    Also, I wish to know best algorithm used in finding the correct intersection( between a ray and the six planar surfaces of a box.

    Thanks,
    Izak

  2. #2
    Registered User Izak's Avatar
    Join Date
    May 2013
    Posts
    10
    I wish @Nominal Animal would come to my aid here

  3. #3
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I'm confused, what's your question here?

    And to find the intersection of a ray and a plane, consider using barycentric coordinates. Simple google searches yield good results.

    Edit : But beware, there will be numerical inaccuracies in which case, you must use a determinant or if possible, an arbitrary precision solver.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A General GPU vectorized solid for Geant4
    By Izak in forum Tech Board
    Replies: 0
    Last Post: 03-24-2014, 12:14 PM
  2. solid tutorial suggestion
    By carpeltunnel in forum C++ Programming
    Replies: 34
    Last Post: 10-23-2013, 08:54 PM
  3. [General Help] Dynamic Arrays and General Pointer syntax
    By Amberlampz in forum C Programming
    Replies: 22
    Last Post: 07-26-2011, 10:58 PM
  4. Replies: 3
    Last Post: 04-04-2002, 05:27 PM
  5. Direct X + C = Solid App?
    By fatpotatohead in forum Game Programming
    Replies: 1
    Last Post: 09-03-2001, 04:37 PM