POV-Ray : Newsgroups : povray.binaries.utilities : Bitmap To Prism Utility (Work In Progress) Server Time: 17 Jan 2019 02:14:50 GMT
  Bitmap To Prism Utility (Work In Progress) (Message 1 to 5 of 5)  
From: Dave Blandston
Subject: Bitmap To Prism Utility (Work In Progress)
Date: 18 Dec 2016 14:20:00
Message: <web.58569aa3e3e0ec7c6ae7df010@news.povray.org>
Hello,

I'm working on a utility to convert black-and-white bitmap images to prisms. So
far I've written two programs (using POV SDL) in furtherance of this objective.

The first program displays the bitmap image and reduces it to a two-dimensional
array of TRUE/FALSE values where TRUE corresponds to a "white" pixel and FALSE
corresponds to a "black" pixel. (In actuality, the color of the target pixels
can be specified.) The next step will be to generate control points for
linear_spline or cubic_spline prisms. The linear_spline control points will be
relatively easy to generate although there are some subtle complexities. This
should be within my brain's limited capability. I think the control points for
cubic_spline prisms, on the other hand, will be much more complicated to
generate.

The second program displays the bitmap image and the prism object over it for
comparison. It will be very useful during development of the control point
generator.

So the reason I'm posting this WIP is that I'm hoping someone may have some
suggestions regarding the generation of cubic_spline control points. There's a
good possibility that this is going to require math that's beyond my ability to
comprehend. Thanks for any advice!

I will post a couple images to demonstrate my progress so far.

Regards,
Dave Blandston


Post a reply to this message


Attachments:
Download 'bitmaptoprism.zip' (7 KB)

From: Bald Eagle
Subject: Re: Bitmap To Prism Utility (Work In Progress)
Date: 19 Dec 2016 13:05:01
Message: <web.5857d9df4d4e4daac437ac910@news.povray.org>
"Dave Blandston" <nomail@nomail> wrote:

> So the reason I'm posting this WIP is that I'm hoping someone may have some
> suggestions regarding the generation of cubic_spline control points. There's a
> good possibility that this is going to require math that's beyond my ability to
> comprehend. Thanks for any advice!


Hi Dave,

I've asked before what the specific equation for generating the cubic spline
was, and haven't had the opportunity to try to hunt it down in the source code.

A while back, I did some interpolation of control points for Bezier splines and
bicubic patches.

Perhaps you could do something similar.

http://news.povray.org/povray.binaries.animations/thread/%3Cweb.56d9fbdd155fef445e7df57c0%40news.povray.org%3E/?mtop=40
6768

See attached copy of latest interpolation macro (still a bit buggy)


Post a reply to this message


Attachments:
Download 'interpolatecontrolpointsfrom.mcr.txt' (9 KB)

From: Dave Blandston
Subject: Re: Bitmap To Prism Utility (Work In Progress)
Date: 21 Dec 2016 17:10:01
Message: <web.585ab7064d4e4daa6ae7df010@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Hi Dave,
>
> I've asked before what the specific equation for generating the cubic spline
> was, and haven't had the opportunity to try to hunt it down in the source code.
>
> A while back, I did some interpolation of control points for Bezier splines and
> bicubic patches.
>
> Perhaps you could do something similar.
>
>
http://news.povray.org/povray.binaries.animations/thread/%3Cweb.56d9fbdd155fef445e7df57c0%40news.povray.org%3E/?mtop=
40
> 6768
>
> See attached copy of latest interpolation macro (still a bit buggy)

Thank you, Mr. Bald Eagle. It has become clear to me that the math involved here
is beyond my ability. I will probably not be able to solve the problem
"correctly," but I may be able to at least come up with a method of generating
rounded corners and eliminate the stair-step effect.

Regards,
Dave Blandston


Post a reply to this message

From: omniverse
Subject: Re: Bitmap To Prism Utility (Work In Progress)
Date: 21 Dec 2016 18:10:00
Message: <web.585ac5314d4e4daa9c5d6c810@news.povray.org>
I'm of no help, sorry. Just want to say I really this idea of image input for
spline shape generation.


Post a reply to this message

From: omniverse
Subject: Re: Bitmap To Prism Utility (Work In Progress)
Date: 22 Dec 2016 01:20:00
Message: <web.585b29424d4e4daa9c5d6c810@news.povray.org>
"omniverse" <omn### [at] charternet> wrote:
> I'm of no help, sorry. Just want to say I really
LIKE
> this idea of image input for spline shape generation.


Post a reply to this message

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