如何在.net中的书中弯曲/弯曲图像 [英] how to bend/curve image like open in a book in .net

查看:78
本文介绍了如何在.net中的书中弯曲/弯曲图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



需要关于如何在.net中弯曲/弯曲图像的帮助。它应该看起来像是在书中打开。任何人都知道这样做的数学公式。它不应该是裁剪也应缩小或调整其颜色。

我有其他变换的例子,如波浪,扭曲但不能在右侧或左侧产生弯曲图像(仅在一侧时)。 />


谢谢



------------------- -------------------------------------------------- -

感谢您的帮助,

我在winforms中需要这个(如果可能,wpf也没关系)。实际上在应用程序中有书的概念,两个页面上都可以有任何图像。我需要这个。我希望这会更多地澄清我的问题。



谢谢

Hi,
Need a help regarding how to bend/curve image in .net.It should look like open in a book.Does any body knows mathematical formula to do this.It should not be cropped should shrink or adjust its color also.
I have example for other transformation like wave,twist but not able to produce curved image at right or left side (at a time only one side).

Thanks

----------------------------------------------------------------------
Thanks for your help,
I need this in winforms (if possible wpf is also fine). Actually in application there is concept of book and there can be any image on both pages.Hence I needed this.I hope this will clarify my question more.

Thanks

推荐答案

我认为这本打开的书大致看起来像是一个对数螺旋的片段: http://en.wikipedia.org/wiki/Logarithmic_spiral [ ^ ]。



打开一本书,你会看到它;螺旋的中心将靠近页面附着的点。它的参数化非常简单,特别是在极坐标中。



祝你好运,

-SA
I think the open book roughly looks like a fragment of a logarithmic spiral: http://en.wikipedia.org/wiki/Logarithmic_spiral[^].

Open a book and you will see it; the center of the spiral will be near the point where the pages are attached. And it''s very simply described parametrically, especially in polar coordinates.

Good luck,
—SA




解决这个问题我尝试了很多几何方程但是无法与图像像素位置联系起来。所以我做的是,从特定开始对于最左边的像素,角度为30度,然后使用Tan公式(三角法)获得提升的''y''像素,然后开始将初始角度降低到最右边的像素。对于每一行图像重复此过程。

这样我得到了我所需要的曲线图像。

虽然根据sergey(SA')的解决方案,我们也可以使用螺旋方程式,并且还没有实现适当的输入。

感谢所有发表评论的人。

for solving this i tried many geometrical equation but was not able to relate with image pixel position.So what i did is, start at particular angle say 30 deg for left most pixel and then using Tan formula (trignometry) to get elevated ''y'' pixel then just started dropping initial angle till right most pixel.repeat this for each line of image.
This way i got my required curve image.
Though as per sergey (SA''s) solution , we can also use spiral equation with proper inputs not implemented yet.
Thanks all guys who posted their comments.


这篇关于如何在.net中的书中弯曲/弯曲图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆