Page 1 of 1

3D Cylinder

Posted: Mon Mar 21, 2005 7:29 pm
by 9232023
I think my last post disappeared to who knows where. It was lengthy so Here is the condensed version.

I want to take 3D data that I have already used to make an impressive OpenGL 3D surface plot and display it in cylindrical format. The surface plot uses a custom palette and works very well in displaying the cylindrical data in a rolled out form. I want to show the same data as a cylindrical projection. I used the 3D point chart to do this, but it just shows as a bunch of individual boxes in my custom colors. Even though the bunch does look like a cylinder, there are gaps between eack data point. I need the data to be similar to the surface plot in that it fills and shades "between" the data points.

Thanks,
Kev

I can email small sample pictures if needed.

Found earlier post

Posted: Mon Mar 21, 2005 7:32 pm
by 9232023
Look in the VCL thread. Username = "ungos" I have no Idea who that is?? or how it got there. Anyway a search for "3D Cylinder" will turn it up.

thanks,
kev

Posted: Tue Mar 22, 2005 8:23 am
by narcis
Hi Kev,

You could try this using Surface or TriSurface series.

Posted: Tue Mar 22, 2005 8:55 pm
by 9232023
Thats the whole idea, but I do not see how I can get a "Surface" to roll up into a cylinder. I tried it. It keeps wanting to connect everything on the "inside" of the tube. If you know how to do this so that I get a hollow tube with the color mapped surface on the outside, please let me know.

For instance... print out a 3DSurface chart. Take the sheet of paper and roll it up so that the printed side is on the outside. Put it in front of you. Hold it with both hands and roll it, tilt it, twist it, look down through the center etc. There you have it! Thats what I want to do on the screen.

thanks,
kev

Posted: Wed Mar 23, 2005 1:09 pm
by narcis
Hi Kev,

There's an example of what you are asking at the TeeChart features demo included with the installation and available at the TeeChart program group. The example is at "All Features\ Welcome!\ Chart Styles\ Extended\ Tri. Surface\ TriSurface Hiding". It doesn't create a cylinder but the idea is the same.

Posted: Wed Mar 30, 2005 7:00 pm
by 9232023
I tried this. It does work... Sort of. I generate my cylindrical data and use AddXYZ(). I end up with a cylinder, but it appears to be solid. When I reduce the circular data density from every 2 degrees to something like every 30 degrees and rotate so that I am looking at the end of the cylinder, I can see that the surface is broken into what looks like individual planes. In other words, it looks like there is a line from one degree across the cylinder to a point directly across from it then back again. It is difficult to describe. It's like slicing a sausage lengthwise into thin slices in such a way that you do not go all the way through so that you can pull it apart like an acordian.

like this...except circular
/\/\/\/\/\/\/\

Can I send a sample picture? I tried mixing up the x,y,z order, but that did not do it.
narcis wrote:Hi Kev,

There's an example of what you are asking at the TeeChart features demo included with the installation and available at the TeeChart program group. The example is at "All Features\ Welcome!\ Chart Styles\ Extended\ Tri. Surface\ TriSurface Hiding". It doesn't create a cylinder but the idea is the same.

Posted: Thu Mar 31, 2005 7:55 am
by narcis
Hi Kev,

Yes please, post the images at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup. It would be helpful if you also included an example project we can run "as-is" to reproduce the problem here.

Posted: Fri Apr 01, 2005 2:08 pm
by 9232023
OK Narcis thanks.

I uploaded some images and a little code snippet yesterday. Did you see it and were they detailed enough?

I also included some info about what I am trying to do. Again, all I really want to do is take the "flat" 3d surface chart, which is an unrolled cylinder and "roll" it back up so that it represents its original cylindrical shape.

If anyone else has tried and succeeded in doing this I would be very interested in learning how you accomplished it!

thanks again,
Kevin
narcis wrote:Hi Kev,

Yes please, post the images at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup. It would be helpful if you also included an example project we can run "as-is" to reproduce the problem here.

Posted: Mon Apr 04, 2005 9:02 am
by narcis
Hi Kev,

Your requirements are a bit too complex for surface or even triangular series surface constructing algorithms. The best approach would be to manually construct surface by using Canvas drawing routines. I've attached a small example at the newsgroups. A similar approach (with modified drawing functions) can be used in your case as well.

Posted: Mon Apr 04, 2005 9:05 pm
by 9232023
Thats too bad... Could you please tell me exactly where to find your examples? I don't see them in the newsgroups.

thanks,
Kevin

Posted: Tue Apr 05, 2005 7:47 am
by narcis
Hi Kevin,

You can find the example at the same newsgroup you posted your images ([url]news://www.steema.net/steema.public.attachments[/url]).

3d Cylinder

Posted: Wed Apr 06, 2005 4:32 pm
by 9232023
Thanks,

I think that might be heading in the right direction. Since the code is in Pascal, I had to link the unit into a Builder project to see it in action. I am having trouble porting the whole thing into Builder though. I have never used Pascall at all. Would you or someone be able to redo the sample in Cpp Builder?

thanks again,

Kevin

Posted: Thu Apr 07, 2005 6:31 am
by Marjan
Hi, Kevin.

Ok, I ported it to C++ Builder (6) and posted the application at same newsgroup.