|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |