POV-Ray : Newsgroups : povray.newusers : DNA creation help? Server Time
30 Jul 2024 04:18:14 EDT (-0400)
  DNA creation help? (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: Akuma
Subject: DNA creation help?
Date: 23 Oct 2004 22:30:00
Message: <web.417b13026e9252d7505508630@news.povray.org>
I've been trying to create a strand of DNA using an isosurface. However, I
keep having trouble creating the double helix using the function f_helix1
found in functions.inc

Could anybody give me an example double helix for me to start with? It'd be
a big help.


Post a reply to this message

From: Oleguer Vilella
Subject: Re: DNA creation help?
Date: 24 Oct 2004 05:08:03
Message: <417b70f3@news.povray.org>
Maybe it will be usefull:

==================================
#declare Helice = union      {
 #declare myCount = 0;

#while(myCount < 50)
 object  {
 Your_Object
  translate <0,myCount/1.2,0>
  rotate <0,myCount*9.5,0>
  }
#declare myCount = myCount + 1;
#end  };

object  { Helice }
object  { Helice rotate <0,90,0> translate <150, -60, 0>}
======================================

Best regards,
Oleguer



news:web.417b13026e9252d7505508630@news.povray.org...
> I've been trying to create a strand of DNA using an isosurface. However, I
> keep having trouble creating the double helix using the function f_helix1
> found in functions.inc
>
> Could anybody give me an example double helix for me to start with? It'd
be
> a big help.
>
>


Post a reply to this message

From: Oleguer Vilella
Subject: Re: DNA creation help?
Date: 24 Oct 2004 11:46:59
Message: <417bce73$1@news.povray.org>
Why it doesn't work?

===================================
#include "functions.inc"
#include "colors.inc"

camera {
  location  <7, 25, -20>
  look_at   <5, 3.0,  0.0> }

light_source { <-100,200,-100> colour rgb 1 }
background { White }

isosurface {
function {  f_helix1 (1, 1, 1, 2, 3, 4, 5, 0.1, 1, 25) }
        max_gradient 1.5
        contained_by {sphere {0, 1.2} }
        pigment {rgb .9}
}
==================================

Regards,
Oleguer


Post a reply to this message

From: Akuma
Subject: Re: DNA creation help?
Date: 24 Oct 2004 12:15:00
Message: <web.417bd46e89e84e748345dda10@news.povray.org>
For some reason, all of my efforts, along with both of your ideas, result in
blank screens; black for me, white for 0leguer's code. I have made sure to
include all necessary .inc files...I don't understand why it won't show up.


Post a reply to this message

From: Oleguer Vilella
Subject: Re: DNA creation help?
Date: 24 Oct 2004 12:36:21
Message: <417bda05$1@news.povray.org>
Yes because you have to put your object, cylinders for exemple:

====================================
#include "colors.inc"
#include "textures.inc"
  background { color White }
  camera {location <170, 11, -110>look_at  <180, -15, -16>}
  light_source { <170, -30, -100> color White}

#declare cilindros = union     {
cylinder{ <-2,0,0>, <2,0,0>, .15
texture { pigment { White } finish { phong .5 } rotate y*90 }}
};

#declare Helice = union      {
#declare myCount = 0;
#while(myCount < 50)
object  { cilindros
translate <0,myCount/1.2,0>
rotate <0,myCount*9.5,0> }
#declare myCount = myCount + 1;
#end
};
object  { Helice }
object  { Helice rotate <0,90,0> translate <150, -60, 0> }
===================================
Tray with it, this is an exemple, here you can see the four nitrogenous
bases if you put an sphere in the two sides of the cylinders on the axis
x, -x.

I had never used the "functions.inc" I don't know why I can not see the
double helix with the functions, I'm investigating it.

Regards,
Oleguer










news:web.417bd46e89e84e748345dda10@news.povray.org...
> For some reason, all of my efforts, along with both of your ideas, result
in
> blank screens; black for me, white for 0leguer's code. I have made sure to
> include all necessary .inc files...I don't understand why it won't show
up.
>
>


Post a reply to this message

From: Mike Williams
Subject: Re: DNA creation help?
Date: 24 Oct 2004 20:29:35
Message: <Qi4HXDAlR1eBFw$n@econym.demon.co.uk>
Wasn't it Akuma who wrote:
>I've been trying to create a strand of DNA using an isosurface. However, I
>keep having trouble creating the double helix using the function f_helix1
>found in functions.inc
>
>Could anybody give me an example double helix for me to start with? It'd be
>a big help.

http://www.econym.demon.co.uk/isotut/builtin1.htm#helix1

The significant numbers for obtaining a double helix are the first
parameter after the x,y,z being 2 and the third parameter (minor radius)
being less than the fourth (major radius)

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Williams
Subject: Re: DNA creation help?
Date: 24 Oct 2004 20:48:48
Message: <1Dqe$HAo1EfBFwh0@econym.demon.co.uk>
Wasn't it Oleguer Vilella who wrote:
>Why it doesn't work?
>
>===================================
>#include "functions.inc"
>#include "colors.inc"
>
>camera {
>  location  <7, 25, -20>
>  look_at   <5, 3.0,  0.0> }
>
>light_source { <-100,200,-100> colour rgb 1 }
>background { White }
>
>isosurface {
>function {  f_helix1 (1, 1, 1, 2, 3, 4, 5, 0.1, 1, 25) }
>        max_gradient 1.5
>        contained_by {sphere {0, 1.2} }
>        pigment {rgb .9}
>}
>==================================

The main reason is that you're only evaluating a single point of the
function. You should say "f_helix1 (x,y,z..." not "f_helix1 (1,1,1..."

You'll also need to increase your max_gradient to about 6.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Oleguer Vilella
Subject: Re: DNA creation help?
Date: 25 Oct 2004 02:32:37
Message: <417c9e05$1@news.povray.org>
Yes Mike, Ok, now that's right.

=====================================
isosurface {
function {  f_helix1 (x, y, z, 2, 3, 4, 5, 0.1, 1, 25) }
        max_gradient 6
        contained_by {sphere {0, 1.2} }
        pigment {rgb .9}
}
=====================================

Thank you very much,
Oleguer




news:1Dqe$HAo1EfBFwh0@econym.demon.co.uk...
> Wasn't it Oleguer Vilella who wrote:
> >Why it doesn't work?
> >
> >===================================
> >#include "functions.inc"
> >#include "colors.inc"
> >
> >camera {
> >  location  <7, 25, -20>
> >  look_at   <5, 3.0,  0.0> }
> >
> >light_source { <-100,200,-100> colour rgb 1 }
> >background { White }
> >
> >isosurface {
> >function {  f_helix1 (1, 1, 1, 2, 3, 4, 5, 0.1, 1, 25) }
> >        max_gradient 1.5
> >        contained_by {sphere {0, 1.2} }
> >        pigment {rgb .9}
> >}
> >==================================
>
> The main reason is that you're only evaluating a single point of the
> function. You should say "f_helix1 (x,y,z..." not "f_helix1 (1,1,1..."
>
> You'll also need to increase your max_gradient to about 6.
>
> -- 
> Mike Williams
> Gentleman of Leisure


Post a reply to this message

From: Oleguer Vilella
Subject: Re: DNA creation help?
Date: 25 Oct 2004 16:50:41
Message: <417d6721@news.povray.org>
How can I rotate it? and how can I translate it? Of I do this it gives me an
error:

====================================
isosurface {
function {  f_helix1 (x, y, z, 2, 3, 4, 5, 0.1, 1, 25) rotate x*25 }
        max_gradient 6
        contained_by {sphere {0, 1.2} }
        pigment {rgb .9}
}
=====================================

Many thanks,
Oleguer



news:417c9e05$1@news.povray.org...
> Yes Mike, Ok, now that's right.
>
> =====================================
> isosurface {
> function {  f_helix1 (x, y, z, 2, 3, 4, 5, 0.1, 1, 25) }
>         max_gradient 6
>         contained_by {sphere {0, 1.2} }
>         pigment {rgb .9}
> }
> =====================================
>
> Thank you very much,
> Oleguer
>
>
>

> news:1Dqe$HAo1EfBFwh0@econym.demon.co.uk...
> > Wasn't it Oleguer Vilella who wrote:
> > >Why it doesn't work?
> > >
> > >===================================
> > >#include "functions.inc"
> > >#include "colors.inc"
> > >
> > >camera {
> > >  location  <7, 25, -20>
> > >  look_at   <5, 3.0,  0.0> }
> > >
> > >light_source { <-100,200,-100> colour rgb 1 }
> > >background { White }
> > >
> > >isosurface {
> > >function {  f_helix1 (1, 1, 1, 2, 3, 4, 5, 0.1, 1, 25) }
> > >        max_gradient 1.5
> > >        contained_by {sphere {0, 1.2} }
> > >        pigment {rgb .9}
> > >}
> > >==================================
> >
> > The main reason is that you're only evaluating a single point of the
> > function. You should say "f_helix1 (x,y,z..." not "f_helix1 (1,1,1..."
> >
> > You'll also need to increase your max_gradient to about 6.
> >
> > -- 
> > Mike Williams
> > Gentleman of Leisure
>
>


Post a reply to this message

From: Mike Williams
Subject: Re: DNA creation help?
Date: 25 Oct 2004 22:47:32
Message: <qMfpsGA9qbfBFwzl@econym.demon.co.uk>
Wasn't it Oleguer Vilella who wrote:
>How can I rotate it? and how can I translate it? Of I do this it gives me an
>error:
>
>====================================
>isosurface {
>function {  f_helix1 (x, y, z, 2, 3, 4, 5, 0.1, 1, 25) rotate x*25 }
>        max_gradient 6
>        contained_by {sphere {0, 1.2} }
>        pigment {rgb .9}
>}
>=====================================

Rotate the isosurface, not the function

isosurface {
function {  f_helix1 (x, y, z, 2, 3, 4, 5, 0.1, 1, 25)  }
        max_gradient 6
        contained_by {sphere {0, 1.2} }
        rotate x*25
        pigment {rgb .9}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.