need some help

Discussion in 'C Programming' started by johnnash, Feb 5, 2008.

  1. johnnash

    johnnash Guest

    i am writing a scientific software in C language which will be use for
    calculation of radar cross section of large aerospace/marine objects.
    the technique i will be using is ray tracing. The aerospace/marine
    objects will be modelled by using NURBS surfaces. So a cad file
    containing these geometrical entities will be the input to my
    software. My questions are

    1. how can i read such cad files in C language ?

    2. How do I process the NURBS surfaces ? I mean how should I create a
    struct which will deal with each surface ?

    Please help me or guide me to a ng where some graphics/c experts may
    be able to help.
    johnnash, Feb 5, 2008
    #1
    1. Advertising

  2. johnnash

    Billy Bong Guest

    On Mon, 04 Feb 2008 23:47:01 -0800, johnnash wrote:

    > i am writing a scientific software in C language which will be use for
    > calculation of radar cross section of large aerospace/marine objects.
    > the technique i will be using is ray tracing. The aerospace/marine
    > objects will be modelled by using NURBS surfaces. So a cad file
    > containing these geometrical entities will be the input to my software.
    > My questions are
    >
    > 1. how can i read such cad files in C language ?
    >
    > 2. How do I process the NURBS surfaces ? I mean how should I create a
    > struct which will deal with each surface ?
    >
    > Please help me or guide me to a ng where some graphics/c experts may be
    > able to help.


    Don't even try this in C. Use C++. Here is the definitive site.

    http://www.opennurbs.org/

    --
    Billy
    Billy Bong, Feb 5, 2008
    #2
    1. Advertising

  3. johnnash said:

    > i am writing a scientific software in C language which will be use for
    > calculation of radar cross section of large aerospace/marine objects.
    > the technique i will be using is ray tracing. The aerospace/marine
    > objects will be modelled by using NURBS surfaces. So a cad file
    > containing these geometrical entities will be the input to my
    > software. My questions are
    >
    > 1. how can i read such cad files in C language ?


    http://www.wotsit.org/list.asp?fc=19 provides file format information for a
    variety of CAD formats.

    >
    > 2. How do I process the NURBS surfaces ? I mean how should I create a
    > struct which will deal with each surface ?


    http://www.rw-designer.com/NURBS gives some basic information on NURBS
    curves. (Don't take that site as gospel, though - it may be that the
    graphics guys - see below - have better recommendations.)

    Since the number of splines in each curve is variable, I would recommend a
    dynamic structure. If you can pin down what information you need to store
    and what the variable parts are, we could certainly help you to express
    that in C.

    > Please help me or guide me to a ng where some graphics/c experts may
    > be able to help.


    For the C bits, right here is fine, but first you need to establish exactly
    what you're trying to represent and manipulate, and the best place for
    that is probably the comp.graphics.algorithms newsgroup.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -http://www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
    Richard Heathfield, Feb 5, 2008
    #3
  4. johnnash

    johnnash Guest

    On Feb 5, 1:22 pm, Billy Bong <> wrote:
    > On Mon, 04 Feb 2008 23:47:01 -0800, johnnash wrote:
    > > i am writing a scientific software in C language which will be use for
    > > calculation of radar cross section of large aerospace/marine objects.
    > > the technique i will be using is ray tracing. The aerospace/marine
    > > objects will be modelled by using NURBS surfaces. So a cad file
    > > containing these geometrical entities will be the input to my software.
    > > My questions are

    >
    > > 1. how can i read such cad files in C language ?

    >
    > > 2. How do I process the NURBS surfaces ? I mean how should I create a
    > > struct which will deal with each surface ?

    >
    > > Please help me or guide me to a ng where some graphics/c experts may be
    > > able to help.

    >
    > Don't even try this in C. Use C++. Here is the definitive site.
    >
    > http://www.opennurbs.org/
    >
    > --
    > Billy


    Actually, I cannot use C++ as I have been told not to use it but
    anyway, thanks for the link.
    johnnash, Feb 5, 2008
    #4
  5. johnnash

    johnnash Guest

    On Feb 5, 2:08 pm, Richard Heathfield <> wrote:
    > johnnash said:
    >
    > > i am writing a scientific software in C language which will be use for
    > > calculation of radar cross section of large aerospace/marine objects.
    > > the technique i will be using is ray tracing. The aerospace/marine
    > > objects will be modelled by using NURBS surfaces. So a cad file
    > > containing these geometrical entities will be the input to my
    > > software. My questions are

    >
    > > 1. how can i read such cad files in C language ?

    >
    > http://www.wotsit.org/list.asp?fc=19provides file format information for a
    > variety of CAD formats.
    >
    >
    >
    > > 2. How do I process the NURBS surfaces ? I mean how should I create a
    > > struct which will deal with each surface ?

    >
    > http://www.rw-designer.com/NURBSgives some basic information on NURBS
    > curves. (Don't take that site as gospel, though - it may be that the
    > graphics guys - see below - have better recommendations.)
    >
    > Since the number of splines in each curve is variable, I would recommend a
    > dynamic structure. If you can pin down what information you need to store
    > and what the variable parts are, we could certainly help you to express
    > that in C.
    >
    > > Please help me or guide me to a ng where some graphics/c experts may
    > > be able to help.

    >
    > For the C bits, right here is fine, but first you need to establish exactly
    > what you're trying to represent and manipulate, and the best place for
    > that is probably the comp.graphics.algorithms newsgroup.
    >
    > --
    > Richard Heathfield <http://www.cpax.org.uk>
    > Email: -http://www. +rjh@
    > Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    > "Usenet is a strange place" - dmr 29 July 1999


    Hi Richard,

    Thanks for the tutorial it was certainly helpful. as far as the C bits
    are concerned the only problem I seem to have is as to how I must go
    about designing the program. I'm only a intermediate level programmer
    and have only 5-6 months of time to finish this huge project(working
    full time). So I was wondering as to how I must divide this program
    into smaller modules i.e. all the .h files and .c files. Is there any
    particular methodology that might help in deciding how I must break
    down the problem into smaller pieces ?
    Do you know about some ray tracing codes ? Do you think it will help
    to go through some of these codes in order to get some idea as to how
    I must begin coding ?
    johnnash, Feb 5, 2008
    #5
  6. johnnash said:

    <snip>

    > Thanks for the tutorial it was certainly helpful. as far as the C bits
    > are concerned the only problem I seem to have is as to how I must go
    > about designing the program. I'm only a intermediate level programmer
    > and have only 5-6 months of time to finish this huge project(working
    > full time). So I was wondering as to how I must divide this program
    > into smaller modules i.e. all the .h files and .c files. Is there any
    > particular methodology that might help in deciding how I must break
    > down the problem into smaller pieces ?


    It's impossible to be dogmatic about this, but I would start off by
    defining the basic concepts in the system, e.g. functions for manipulating
    vectors and NURBS curves would sit very nicely in one module, your
    "virtual world" stuff (representations, rotations, translations, scaling)
    would make another good one, your rendering buffer routines could make
    another, and so on. Let each module stand alone as far as possible. If you
    have to combine them, do so by calling those routines from functions
    defined in *another* module which, again, is as standalone as possible.

    Put the public interface of each module into its own header file.

    > Do you know about some ray tracing codes ? Do you think it will help
    > to go through some of these codes in order to get some idea as to how
    > I must begin coding ?


    Your best source of advice on high quality ray tracing code would be
    comp.graphics.algorithms.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -http://www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
    Richard Heathfield, Feb 5, 2008
    #6
  7. "johnnash" <> wrote in message
    news:...
    >i am writing a scientific software in C language which will be use for
    > calculation of radar cross section of large aerospace/marine objects.
    > the technique i will be using is ray tracing. The aerospace/marine
    > objects will be modelled by using NURBS surfaces. So a cad file
    > containing these geometrical entities will be the input to my
    > software. My questions are
    >
    > 1. how can i read such cad files in C language ?
    >
    > 2. How do I process the NURBS surfaces ? I mean how should I create a
    > struct which will deal with each surface ?
    >
    > Please help me or guide me to a ng where some graphics/c experts may
    > be able to help.
    >

    Is this over your head, or is it helpful?
    www.cs.utah.edu/vissim/papers/raynurbs/node3.html

    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
    Malcolm McLean, Feb 5, 2008
    #7
  8. johnnash

    Bartc Guest

    johnnash wrote:
    > i am writing a scientific software in C language which will be use for
    > calculation of radar cross section of large aerospace/marine objects.
    > the technique i will be using is ray tracing. The aerospace/marine
    > objects will be modelled by using NURBS surfaces. So a cad file
    > containing these geometrical entities will be the input to my
    > software. My questions are
    >
    > 1. how can i read such cad files in C language ?


    Is this any specific cad file format? If so which one?

    What do you mean by ray tracing? That is normally a technique for rendering
    a view of the objects.

    --
    Bart
    Bartc, Feb 5, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    679
    Guest
    Feb 25, 2004
  2. Holmes!
    Replies:
    2
    Views:
    430
    Malcolm Dew-Jones
    Apr 2, 2005
  3. =?Utf-8?B?Q2hyaXM=?=

    Help Help. I really need some help with this

    =?Utf-8?B?Q2hyaXM=?=, Jan 31, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    560
    =?Utf-8?B?SmFzb24gVmVybWlsbGlvbg==?=
    Jan 31, 2007
  4. Domino
    Replies:
    5
    Views:
    379
    dorayme
    Nov 5, 2006
  5. Replies:
    4
    Views:
    335
    Puppet_Sock
    Oct 19, 2006
Loading...

Share This Page