设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
编程开发讨论区 —— LinuxSir.cn
›
Linux 程序设计专题讨论
›
how to find a line which is perpendicular to a given ...
返回列表
查看:
837
|
回复:
3
how to find a line which is perpendicular to a given line programmaticlly ???
[复制链接]
zlly20
zlly20
当前离线
积分
534
IP卡
狗仔卡
发表于 2005-8-25 18:18:09
|
显示全部楼层
|
阅读模式
Say, I have a line A :
y = a * x + b
now I want to find another line which is perpendicular to A at point M [m, n] and M is on A:
y1 = a1 * x1 + b1
what is the simplest way to do it programmatically in c++???
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
gamedragon
gamedragon
当前离线
积分
568
IP卡
狗仔卡
发表于 2005-8-26 09:36:53
|
显示全部楼层
a1=-1/a (a!=0)
回复
支持
反对
使用道具
举报
显身卡
bookstack
bookstack
当前离线
积分
714
IP卡
狗仔卡
发表于 2005-8-27 02:29:45
|
显示全部楼层
用lex && yacc 来分析:
y = a * x + b
var_0 = var_1 times var_2 plus var_3
得到syntax tree以后,遍历找相似的。
回复
支持
反对
使用道具
举报
显身卡
gamedragon
gamedragon
当前离线
积分
568
IP卡
狗仔卡
发表于 2005-8-27 10:21:52
|
显示全部楼层
楼主问的是语法分析的问题么?难道我理解错了?
perpendicular不是垂直的意思么?
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表