|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is this the right group to discuss details of an object in the collection?
If so,
I wanted to discuss how to improve, or add another scroll object.
I am referring to Scroll Version: chrisb 1.0
It is not built along an axis and is therefore not easy to place and
to orient it. Also, I would like to use it as a scroll, with text (or pictures)
but am having poor results with text.
I was rewriting it to use some conventions that would allow several parameters
but my goal of having text was lost when the straight portion is smooth.
Leef_me
Post a reply to this message
|
|
| |
| |
|
|
From: Nicolas Alvarez
Subject: Re: Is this the right group to discuss details of an object in the collection?
Date: 6 Nov 2007 17:27:55
Message: <4730ea6b@news.povray.org>
|
|
|
| |
| |
|
|
> Is this the right group to discuss details of an object in the collection?
Well, the group is otherwise mostly quiet anyway, so I don't think it's
wrong to discuss that here.
Post a reply to this message
|
|
| |
| |
|
|
From: Chris B
Subject: Re: Is this the right group to discuss details of an object in the collection?
Date: 7 Nov 2007 04:37:37
Message: <47318761$1@news.povray.org>
|
|
|
| |
| |
|
|
"Leef_me" <nomail@nomail> wrote in message
news:web.4730e948c70624052a7b15450@news.povray.org...
> Is this the right group to discuss details of an object in the collection?
Yes, it's absolutely fine to discuss it here.
>
> If so,
> I wanted to discuss how to improve, or add another scroll object.
> I am referring to Scroll Version: chrisb 1.0
>
When submitting another object you have the choice of adding a new object or
superceding an existing one.
If your object does most or all of what the existing one does, plus other
stuff that the existing one doesn't (e.g. options for adding text or
pictures) then choose the 'Existing' option in the first pull-down on the
submissions screen and use the name 'Scroll'.
Your object will then be displayed in the search screen. The person
searching for objects will see a pull-down list of versions and will have
the option of switching to an older version, but the most recent will be
displayed by default.
If the existing object can be used in ways that your new object can't then
you should pick a different name, so that both come up when someone does a
search.
> It is not built along an axis and is therefore not easy to place and
> to orient it. Also, I would like to use it as a scroll, with text (or
> pictures)
> but am having poor results with text.
>
> I was rewriting it to use some conventions that would allow several
> parameters
> but my goal of having text was lost when the straight portion is smooth.
I didn't quite understand the last bit of that last sentence.
>
> Leef_me
>
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Chris B" <nom### [at] nomailcom> wrote:
> "Leef_me" <nomail@nomail> wrote in message
> news:web.4730e948c70624052a7b15450@news.povray.org...
> > Is this the right group to discuss details of an object in the collection?
>
>
> Yes, it's absolutely fine to discuss it here.
>
> >
> > If so,
> > I wanted to discuss how to improve, or add another scroll object.
> > I am referring to Scroll Version: chrisb 1.0
> >
>
----8<----------8<----------8<----------8<----------8<------
> > I was rewriting it to use some conventions that would allow several
> > parameters
> > but my goal of having text was lost when the straight portion is smooth.
>
> I didn't quite understand the last bit of that last sentence.
>
> >
> > Leef_me
> >
>
> Regards,
> Chris B.
Yeah, I have trouble understanding it too. ;)
I looked at the code for scroll and wanted to "standardize" it.
I wanted to create a version that would allow for user to vary parameters such
as height and width, # of spirals, othe stuff.
I wanted to be able to add text or image to the scroll. For example, "the King
proclaims, thus ..."
I was able to simplify the code for the above ideas.
I was able to add text to the mesh2 object and it looked pretty good.
But, when I tried to smooth the 'straight' portion of the scroll, the text would
either:
show on both sides,
not show at all,
I've tried learning about UV-mapping, but I'm still lost.
My last few posts have been trying to understand what I'm doing wrong.
I'll try later or tomorrow to post a simple version of the code.
Leef_me
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here's my reworked scroll code. I wanted to focus on determining and
understanding why I get the text on both sides of the scroll and why the weird
pattern appears on the flat portion of the scroll.
+kff10 will rotate the camera so you can see both sides of the scroll.
Thanks in advance to all who can help me understand what's going wrong, and how
to fix this.
You will need the include file from "Scroll Version: chrisb 1.0"
look here http://lib.povray.org/searchcollection/index.php
Leef_me
#include "colors.inc"
#include "math.inc"
#include "Scroll_array2mesh2.inc"
camera {
perspective
location <-0.2,0.3,-2> look_at 0.1
rotate y*-30
//rotate y*-30
// rotate y*-30
rotate y*90*clock
translate y*-.5
}
light_source { <-10,4,-4> color rgb 1}
light_source { <0,4,-5> color rgb 1}
light_source { <10,-7,-10> color rgb 1}
light_source { <5,0,-5> color rgb 1}
light_source { <-.5,0,0> color White }
light_source { <.5,0,0> color White }
#local SW2 = .80; // Scroll_width
#local Scroll_R = 0.1015;
#local Scroll_I = -540;
#local Scroll_X = Scroll_R*cosd(Scroll_I);
#local Scroll_Y = Scroll_R*sind(Scroll_I);
#local Scroll_Z = 0;
// The coordinates of the mesh2 nodes are written into an array
#local Scroll_Array = array [1000][2];
// First do a spiral at one end
#local Scroll_I = -540;
#local Scroll_I = 200; // set start and ending degrees same to disable
spiral
#local Scroll_ArrayIndex = 0;
#local Scroll_R = 0.05;
#while (Scroll_I<200)
#local Scroll_X = Scroll_R*cosd(Scroll_I);
#local Scroll_Y = Scroll_R*sind(Scroll_I);
#local Scroll_Z = 0;
#local Scroll_Array[Scroll_ArrayIndex][0] =
<Scroll_X,Scroll_Y+0.3,Scroll_Z-SW2>;
#local Scroll_Array[Scroll_ArrayIndex][1] =
<Scroll_X,Scroll_Y+0.3,Scroll_Z+SW2>;
#local Scroll_R = Scroll_R*1.01; // Add 1 percent to the radius each time
#local Scroll_I = Scroll_I + 10;
#local Scroll_ArrayIndex = Scroll_ArrayIndex + 1;
#end
#local Scroll_flt = .3; // this is the flat area of the scroll
#while (Scroll_flt>-.8)
#local Scroll_Array[Scroll_ArrayIndex][0] =
<Scroll_X,Scroll_Y+Scroll_flt,Scroll_Z-SW2>;
#local Scroll_Array[Scroll_ArrayIndex][1] =
<Scroll_X,Scroll_Y+Scroll_flt,Scroll_Z+SW2>;
#local Scroll_ArrayIndex = Scroll_ArrayIndex + 1;
#local Scroll_flt = Scroll_flt-.02;
#end
// Then add a spiral at the other end
//#local Scroll_I = Scroll_I-10;
#local Scroll_I1 = Scroll_I+720;
#local Scroll_I1 = Scroll_I+0;
// set start and ending degrees same to disable spiral
#while (Scroll_I<Scroll_I1)
#local Scroll_X = Scroll_R*cosd(Scroll_I);
#local Scroll_Y = Scroll_R*sind(Scroll_I);
#local Scroll_Z = 0;
#local Scroll_Array[Scroll_ArrayIndex][0] =
<Scroll_X,Scroll_Y+Scroll_flt,Scroll_Z-SW2>;
#local Scroll_Array[Scroll_ArrayIndex][1] =
<Scroll_X,Scroll_Y+Scroll_flt,Scroll_Z+SW2>;
#local Scroll_R = Scroll_R*0.99;
// Remove 1 percent from the radius each time
#local Scroll_I = Scroll_I + 10;
#local Scroll_ArrayIndex = Scroll_ArrayIndex + 1;
#end
#declare my_text=
text{
ttf"arialbd.ttf" "This is a test" 1,0
translate -z/2
// suggested by fellow pover Samuel Benge Date: 21 Oct 2007 20:39:07
// Re: Simple 2D text on a cylinder's surface
scale .2
//rotate <0,0,90>
// translation allows placement of text on the surface
// translate<-.7,0,0>
// when the rotation is 90, then these parameters are y,x,z
}
// when the rotation is 0, then these parameters are x,y,z
#if(1)
// Call a function to generate a mesh2 object from the array
#local Scroll_DummyArray = array [Scroll_ArrayIndex][2];
#local Scroll_Verbose = 0;
object {Scroll_Mesh2FromArray(Scroll_Array, Scroll_DummyArray,
Scroll_ArrayIndex, 2, 0)
uv_mapping
texture { // one side has background and text
#if(0)
pigment { color rgb Pink }
#else
pigment{
pigment_pattern{
object{my_text 0,1}
}
pigment_map{
[0 color Yellow]
[1 color Blue]
}
}
#end
}
interior_texture { // the other side has another background
#if(1)
pigment { color rgb Pink }
#else
pigment{
pigment_pattern{
object{my_text 0,1}
}
pigment_map{
[0 color Red]
[1 color White]
}
}
#end
}
rotate y*-45
rotate y*180*clock // look at both sides of the disc
}
#end
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
Post a reply to this message
|
|
| |
| |
|
|
From: Chris B
Subject: Re: Is this the right group to discuss details of an object in the collecti=
Date: 8 Nov 2007 09:35:17
Message: <47331ea5@news.povray.org>
|
|
|
| |
| |
|
|
"Leef_me" <nomail@nomail> wrote in message
news:web.4732b8c8e76f755f892adb1d0@news.povray.org...
>
> Here's my reworked scroll code. I wanted to focus on determining and
> understanding why I get the text on both sides of the scroll and why the
> weird
> pattern appears on the flat portion of the scroll.
>
> You will need the include file from "Scroll Version: chrisb 1.0"
> look here http://lib.povray.org/searchcollection/index.php
>
> Leef_me
>
Hi,
The problem is in the macro inside the "Scroll_array2mesh2.inc" file which
defines the triangles that make up the mesh object. Alternating triangles
are defined clockwise then anticlockwise causing the normals for each
triangle to point in the opposite direction to the previous triangle. So on
each side of the surface, half the area is 'interior' and half is
'exterior'.
To fix this, replace the 3 identical lines 123, 136 and 149 with copies of
the following line
<Scroll_J+1+(Scroll_I+1)*Scroll_JTotal,
Scroll_J+1+Scroll_I*Scroll_JTotal, Scroll_J+(Scroll_I+1)*Scroll_JTotal>
This just changes the sequence of every second set of triangles so that both
sets are defined in the same direction, giving it a consistent 'interior'
and 'exterior'.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> To fix this, replace the 3 identical lines 123, 136 and 149 with copies of
> the following line
>
> <Scroll_J+1+(Scroll_I+1)*Scroll_JTotal,
> Scroll_J+1+Scroll_I*Scroll_JTotal, Scroll_J+(Scroll_I+1)*Scroll_JTotal>
>
> This just changes the sequence of every second set of triangles so that both
> sets are defined in the same direction, giving it a consistent 'interior'
> and 'exterior'.
>
> Regards,
> Chris B.
Yep, that seems to fix the problem. Thanks.
Leef_me
Post a reply to this message
|
|
| |
| |
|
|
From: Nicolas Alvarez
Subject: Re: Is this the right group to discuss details of an object in the collection?
Date: 15 Mar 2008 14:43:17
Message: <47dc26d5$1@news.povray.org>
|
|
|
| |
| |
|
|
Chris B escribió:
> "Leef_me" <nomail@nomail> wrote in message
> news:web.4730e948c70624052a7b15450@news.povray.org...
>> Is this the right group to discuss details of an object in the collection?
>
>
> Yes, it's absolutely fine to discuss it here.
The readme file downloaded in a zip mentions (and links to)
povray.objects newsgroup, which doesn't exist.
Post a reply to this message
|
|
| |
| |
|
|
From: Chris B
Subject: Re: Is this the right group to discuss details of an object in the collection?
Date: 15 Mar 2008 18:23:41
Message: <47dc5a7d@news.povray.org>
|
|
|
| |
| |
|
|
"Nicolas Alvarez" <nic### [at] gmailisthebestcom> wrote in message
news:47dc26d5$1@news.povray.org...
>> "Leef_me" <nomail@nomail> wrote in message
>> news:web.4730e948c70624052a7b15450@news.povray.org...
>>> Is this the right group to discuss details of an object in the
>>> collection?
>>
>>
>> Yes, it's absolutely fine to discuss it here.
>
> The readme file downloaded in a zip mentions (and links to) povray.objects
> newsgroup, which doesn't exist.
ok. Thanks. I've fixed that now to point to this newsgroup.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
From: Chris B
Subject: Re: Is this the right group to discuss details of an object in the collecti=
Date: 20 Aug 2008 11:39:35
Message: <48ac3ab7$1@news.povray.org>
|
|
|
| |
| |
|
|
It's taken a while, but I've removed the limitations reported earlier this
year with the Scroll object. V2.0 at
http://lib.povray.org/collection/scroll/chrisb%202.0/scroll.html is now a
macro with settings that enable you to control almost everything (width.
length radius etc.).
The uv-mapping and normal issues are sorted, so you can add text or any
other pattern (including a tiled image map) and have it follow the scroll
contours. You can specify a seperate interior_texture to get a different
texture on the back. There's are text layout options for justification of
blocks of text, including full justification.
Examples are now included demonstrating how to use it for kitchen rolls,
rolls of wallpaper and tin-foil as well as paper scrolls with writing in
both portrait and landscape mode. There's even an animation example.
Regards,
Chris B
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|