Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ladybug_ViewAnalysis View Cone for Point Targets Enhancement #361

Open
marios-tsiliakos opened this issue Mar 1, 2017 · 2 comments
Open

Comments

@marios-tsiliakos
Copy link

Hi @mostaphaRoudsari,

As an enhancement for the view analysis component you should consider adding a view cone option for the Ladybug_ViewAnalysis Component when point(s) are set up as targets.

I've added the following code to the Ladybug_Ladybug Component at the parallel_viewCalculator method

                    viewRange = math.pi/3 #the cone of view to contstrain the calculation_within
                    if check != 0:
                        if vecAngle< viewRange: #check if the viewVec is withi the viewing cone
                            view[i] += ptImportance[ptCount] #if yes add the value to the view result
                        else:
                            view[i] += 0 #if not add zero

It seems to work however I'm sure you will be able to integrate it better.

Ta,
M

@chriswmackey
Copy link
Member

@marios-tsiliakos ,

This is a good idea and we should leave this issue open here until it is integrated. I see where you would insert the proposed code into the parallel_viewCalculator function. However, this is only using a single parameter of the view cone and there would need to be a bit more code to have all 4 parameters of the view cone be taken into account. Specifically, you would need a function like this in the view analysis component:
https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug_View%20Analysis.py#L218-L254

If you build a function like this in and send a pull request to our github here, I will merge it into the code base. Otherwise, I'll try to get around to implementing this eventually.

-Chris

@marios-tsiliakos
Copy link
Author

Hi @chriswmackey ,

Yes I believe it makes perfect sense to confine the analysis within a viewing cone.
Will try to look into this a little bit more when I find some time. If I end up writing something solid I will send a pull request,

Cheers
M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants